Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_structures.py: 39%
41 statements
« prev ^ index » next coverage.py v7.0.1, created at 2022-12-25 06:11 +0000
« prev ^ index » next coverage.py v7.0.1, created at 2022-12-25 06:11 +0000
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.
4from __future__ import absolute_import, division, print_function
7class Infinity(object):
9 def __repr__(self):
10 return "Infinity"
12 def __hash__(self):
13 return hash(repr(self))
15 def __lt__(self, other):
16 return False
18 def __le__(self, other):
19 return False
21 def __eq__(self, other):
22 return isinstance(other, self.__class__)
24 def __ne__(self, other):
25 return not isinstance(other, self.__class__)
27 def __gt__(self, other):
28 return True
30 def __ge__(self, other):
31 return True
33 def __neg__(self):
34 return NegativeInfinity
36Infinity = Infinity()
39class NegativeInfinity(object):
41 def __repr__(self):
42 return "-Infinity"
44 def __hash__(self):
45 return hash(repr(self))
47 def __lt__(self, other):
48 return True
50 def __le__(self, other):
51 return True
53 def __eq__(self, other):
54 return isinstance(other, self.__class__)
56 def __ne__(self, other):
57 return not isinstance(other, self.__class__)
59 def __gt__(self, other):
60 return False
62 def __ge__(self, other):
63 return False
65 def __neg__(self):
66 return Infinity
68NegativeInfinity = NegativeInfinity()