Skip to content

Commit e1de29f

Browse files
committed
finally fix that 2/3 logic
1 parent 983d8f7 commit e1de29f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

histogrammar/util.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
xrange = range
2828
long = int
2929
from functools import total_ordering
30-
else:
31-
if sys.version_info[0] == 2 and sys.version_info[1] <= 6:
32-
def LessThanEverything(): return None
33-
else:
34-
from functools import total_ordering
35-
@total_ordering
36-
class LessThanEverything(object):
37-
"""An object that will always float the the beginning of a list in a sort."""
38-
def __le__(self, other):
39-
return True
40-
def __eq__(self, other):
41-
return self is other
30+
31+
try:
32+
from functools import total_ordering
33+
@total_ordering
34+
class LessThanEverything(object):
35+
"""An object that will always float the the beginning of a list in a sort."""
36+
def __le__(self, other):
37+
return True
38+
def __eq__(self, other):
39+
return self is other
40+
except ImportError:
41+
def LessThanEverything(): return None
4242

4343
def inheritdoc(cls):
4444
def _fn(fn):

0 commit comments

Comments
 (0)