Types
infinity = Infinity()
module-attribute
The singleton instance of Infinity.
negative_infinity = NegativeInfinity()
module-attribute
The singleton instance of NegativeInfinity.
AnyInfinity = Union[Infinity, NegativeInfinity]
module-attribute
The union of Infinity and
NegativeInfinity.
Infinity
Bases: Singleton
Represents the positive infinity.
Source code in versions/types.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
NegativeInfinity
Bases: Singleton
Represents the negative infinity.
Source code in versions/types.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
is_infinity(item: Any) -> TypeGuard[Infinity]
Checks if an item is an instance of Infinity.
Returns:
| Type | Description |
|---|---|
TypeGuard[Infinity]
|
Whether the |
Source code in versions/types.py
61 62 63 64 65 66 67 | |
is_negative_infinity(item: Any) -> TypeGuard[NegativeInfinity]
Checks if an item is an instance of NegativeInfinity.
Returns:
| Type | Description |
|---|---|
TypeGuard[NegativeInfinity]
|
Whether the |
Source code in versions/types.py
102 103 104 105 106 107 108 | |
is_any_infinity(item: Any) -> TypeGuard[AnyInfinity]
Checks if an item is an instance of AnyInfinity.
Returns:
| Type | Description |
|---|---|
TypeGuard[AnyInfinity]
|
Whether the |
Source code in versions/types.py
117 118 119 120 121 122 123 | |