mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
remove another use of cmp()
This commit is contained in:
parent
821d0f8b1f
commit
d67c60ff81
1 changed files with 6 additions and 1 deletions
|
@ -338,7 +338,12 @@ class LooseVersion (Version):
|
|||
if isinstance(other, str):
|
||||
other = LooseVersion(other)
|
||||
|
||||
return cmp(self.version, other.version)
|
||||
if self.version == other.version:
|
||||
return 0
|
||||
if self.version < other.version:
|
||||
return -1
|
||||
if self.version > other.version:
|
||||
return 1
|
||||
|
||||
|
||||
# end class LooseVersion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue