diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2009-09-12 17:52:23 +0200 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2009-09-12 17:52:23 +0200 |
| commit | 401070a618a036ed6295e5e1c1b925a66471f86d (patch) | |
| tree | bba1030e598106bb11a44038d94859e565ed9e17 | |
| parent | f6747b162905d4fe48701a8655c857d8ef363b9d (diff) | |
| download | python-setuptools-git-401070a618a036ed6295e5e1c1b925a66471f86d.tar.gz | |
Replace cmp.
--HG--
branch : distribute
extra : rebase_source : 3d8d4d289d13bbb9fb9c946e31282c578264f626
| -rw-r--r-- | pkg_resources.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 910c3089..7c3d58fb 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -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 |
