summaryrefslogtreecommitdiff
path: root/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/packaging/_structures.py
diff options
context:
space:
mode:
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/packaging/_structures.py')
-rw-r--r--venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/packaging/_structures.py70
1 files changed, 70 insertions, 0 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/packaging/_structures.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/packaging/_structures.py
new file mode 100644
index 0000000..3f0c27f
--- /dev/null
+++ b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/packaging/_structures.py
@@ -0,0 +1,70 @@
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
5
6
7class Infinity(object):
8
9 def __repr__(self):
10 return "Infinity"
11
12 def __hash__(self):
13 return hash(repr(self))
14
15 def __lt__(self, other):
16 return False
17
18 def __le__(self, other):
19 return False
20
21 def __eq__(self, other):
22 return isinstance(other, self.__class__)
23
24 def __ne__(self, other):
25 return not isinstance(other, self.__class__)
26
27 def __gt__(self, other):
28 return True
29
30 def __ge__(self, other):
31 return True
32
33 def __neg__(self):
34 return NegativeInfinity
35
36
37Infinity = Infinity()
38
39
40class NegativeInfinity(object):
41
42 def __repr__(self):
43 return "-Infinity"
44
45 def __hash__(self):
46 return hash(repr(self))
47
48 def __lt__(self, other):
49 return True
50
51 def __le__(self, other):
52 return True
53
54 def __eq__(self, other):
55 return isinstance(other, self.__class__)
56
57 def __ne__(self, other):
58 return not isinstance(other, self.__class__)
59
60 def __gt__(self, other):
61 return False
62
63 def __ge__(self, other):
64 return False
65
66 def __neg__(self):
67 return Infinity
68
69
70NegativeInfinity = NegativeInfinity()