Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._vendor.rich._pick Namespace Reference

Functions

bool pick_bool (*Optional[bool] values)
 

Function Documentation

◆ pick_bool()

bool pick_bool ( *Optional[bool]  values)
Pick the first non-none bool or return the last value.

Args:
    *values (bool): Any number of boolean or None values.

Returns:
    bool: First non-none boolean.

Definition at line 4 of file _pick.py.

4def pick_bool(*values: Optional[bool]) -> bool:
5 """Pick the first non-none bool or return the last value.
6
7 Args:
8 *values (bool): Any number of boolean or None values.
9
10 Returns:
11 bool: First non-none boolean.
12 """
13 assert values, "1 or more values required"
14 for value in values:
15 if value is not None:
16 return value
17 return bool(value)