summaryrefslogtreecommitdiff
path: root/lib/_range.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2014-02-22 21:52:44 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2014-02-22 21:52:44 +0000
commit8937c635df2699c7869911764dd079d8fdd3d4ca (patch)
treeaf6ec21f380c297e0a7f8aa0d137b053f4b5b3d1 /lib/_range.py
parent4545d1636ca40d9aef05504a271cff862f0ed03b (diff)
downloadpsycopg2-8937c635df2699c7869911764dd079d8fdd3d4ca.tar.gz
Hardcode the list of attributes to be used in comparison
Comparing Range subclasses may lead to surprises.
Diffstat (limited to 'lib/_range.py')
-rw-r--r--lib/_range.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_range.py b/lib/_range.py
index 29e1836..35516ac 100644
--- a/lib/_range.py
+++ b/lib/_range.py
@@ -140,7 +140,7 @@ class Range(object):
def __lt__(self, other):
if not isinstance(other, Range):
return NotImplemented
- for attr in self.__slots__:
+ for attr in ('_lower', '_upper', '_bounds'):
self_value = getattr(self, attr)
other_value = getattr(other, attr)
if self_value == other_value: