1 # This file is dual licensed under the terms of the Apache License, Version
2 # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 # for complete details.
7 def __repr__(self) -> str:
10 def __hash__(self) -> int:
11 return hash(repr(self))
13 def __lt__(self, other: object) -> bool:
16 def __le__(self, other: object) -> bool:
19 def __eq__(self, other: object) -> bool:
20 return isinstance(other, self.__class__)
22 def __gt__(self, other: object) -> bool:
25 def __ge__(self, other: object) -> bool:
28 def __neg__(self: object) -> "NegativeInfinityType":
29 return NegativeInfinity
32 Infinity = InfinityType()
35 class NegativeInfinityType:
36 def __repr__(self) -> str:
39 def __hash__(self) -> int:
40 return hash(repr(self))
42 def __lt__(self, other: object) -> bool:
45 def __le__(self, other: object) -> bool:
48 def __eq__(self, other: object) -> bool:
49 return isinstance(other, self.__class__)
51 def __gt__(self, other: object) -> bool:
54 def __ge__(self, other: object) -> bool:
57 def __neg__(self: object) -> InfinityType:
61 NegativeInfinity = NegativeInfinityType()