Commit 401070a6 authored by Martin v. Löwis's avatar Martin v. Löwis

Replace cmp.

--HG--
branch : distribute
extra : rebase_source : 3d8d4d289d13bbb9fb9c946e31282c578264f626
parent f6747b16
......@@ -2466,8 +2466,9 @@ class Requirement:
elif isinstance(item,basestring):
item = parse_version(item)
last = None
compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1
for parsed,trans,op,ver in self.index:
action = trans[cmp(item,parsed)]
action = trans[compare(item,parsed)] # Indexing: 0, 1, -1
if action=='F': return False
elif action=='T': return True
elif action=='+': last = True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment