[Python-checkins] r69683 - in python/branches/release30-maint: Lib/distutils/version.py
benjamin.peterson
python-checkins at python.org
Mon Feb 16 19:25:19 CET 2009
Author: benjamin.peterson
Date: Mon Feb 16 19:25:19 2009
New Revision: 69683
Log:
Merged revisions 69682 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r69682 | benjamin.peterson | 2009-02-16 12:22:15 -0600 (Mon, 16 Feb 2009) | 1 line
remove another use of cmp()
........
Modified:
python/branches/release30-maint/ (props changed)
python/branches/release30-maint/Lib/distutils/version.py
Modified: python/branches/release30-maint/Lib/distutils/version.py
==============================================================================
--- python/branches/release30-maint/Lib/distutils/version.py (original)
+++ python/branches/release30-maint/Lib/distutils/version.py Mon Feb 16 19:25:19 2009
@@ -338,7 +338,12 @@
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
More information about the Python-checkins
mailing list