summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/version.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 12:20:51 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 12:20:51 (GMT)
commitb3acd3e4d338ef41d50b86e9230646c510bb5c6a (patch)
tree8b68e9d058cfd6d8eb218956cb194bbcb8beb523 /Lib/distutils/version.py
parent7e642e82d3429d9b4f583ba0e81a27e5ea02d5ca (diff)
downloadcpython-b3acd3e4d338ef41d50b86e9230646c510bb5c6a.zip
cpython-b3acd3e4d338ef41d50b86e9230646c510bb5c6a.tar.gz
cpython-b3acd3e4d338ef41d50b86e9230646c510bb5c6a.tar.bz2
String method conversion.
Diffstat (limited to 'Lib/distutils/version.py')
-rw-r--r--Lib/distutils/version.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/distutils/version.py b/Lib/distutils/version.py
index 9d3d172..2916eb7 100644
--- a/Lib/distutils/version.py
+++ b/Lib/distutils/version.py
@@ -112,12 +112,12 @@ class StrictVersion (Version):
match.group(1, 2, 4, 5, 6)
if patch:
- self.version = tuple(map(string.atoi, [major, minor, patch]))
+ self.version = tuple(map(int, [major, minor, patch]))
else:
- self.version = tuple(map(string.atoi, [major, minor]) + [0])
+ self.version = tuple(map(int, [major, minor]) + [0])
if prerelease:
- self.prerelease = (prerelease[0], string.atoi(prerelease_num))
+ self.prerelease = (prerelease[0], int(prerelease_num))
else:
self.prerelease = None
@@ -125,9 +125,9 @@ class StrictVersion (Version):
def __str__ (self):
if self.version[2] == 0:
- vstring = string.join(map(str, self.version[0:2]), '.')
+ vstring = '.'.join(map(str, self.version[0:2]))
else:
- vstring = string.join(map(str, self.version), '.')
+ vstring = '.'.join(map(str, self.version))
if self.prerelease:
vstring = vstring + self.prerelease[0] + str(self.prerelease[1])