Commit 5a07c8be authored by Jason R. Coombs's avatar Jason R. Coombs

Rewrite hashcmp using modern syntax

parent 06877f1a
......@@ -2200,16 +2200,17 @@ class Distribution(object):
py_version=py_version, platform=platform, **kw
)
hashcmp = property(
lambda self: (
getattr(self,'parsed_version',()),
@property
def hashcmp(self):
return (
getattr(self, 'parsed_version', ()),
self.precedence,
self.key,
_remove_md5_fragment(self.location),
self.py_version,
self.platform
self.platform,
)
)
def __hash__(self): return hash(self.hashcmp)
def __lt__(self, other):
return self.hashcmp < other.hashcmp
......
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