diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2001-03-22 03:48:31 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2001-03-22 03:48:31 (GMT) |
commit | ac20f773f3b625121ff5f593fbb9f0934bfb8d8e (patch) | |
tree | 9a0b4a3b1214a8796d6784abd95a0127d1c745c9 /Lib/distutils/version.py | |
parent | a7f225d88af3b7a77b0fd8c0ed6129b46c5af865 (diff) | |
download | cpython-ac20f773f3b625121ff5f593fbb9f0934bfb8d8e.zip cpython-ac20f773f3b625121ff5f593fbb9f0934bfb8d8e.tar.gz cpython-ac20f773f3b625121ff5f593fbb9f0934bfb8d8e.tar.bz2 |
Back out conversion to string methods; the Distutils is intended to work
with 1.5.2
Diffstat (limited to 'Lib/distutils/version.py')
-rw-r--r-- | Lib/distutils/version.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/distutils/version.py b/Lib/distutils/version.py index 2916eb7..9d3d172 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(int, [major, minor, patch])) + self.version = tuple(map(string.atoi, [major, minor, patch])) else: - self.version = tuple(map(int, [major, minor]) + [0]) + self.version = tuple(map(string.atoi, [major, minor]) + [0]) if prerelease: - self.prerelease = (prerelease[0], int(prerelease_num)) + self.prerelease = (prerelease[0], string.atoi(prerelease_num)) else: self.prerelease = None @@ -125,9 +125,9 @@ class StrictVersion (Version): def __str__ (self): if self.version[2] == 0: - vstring = '.'.join(map(str, self.version[0:2])) + vstring = string.join(map(str, self.version[0:2]), '.') else: - vstring = '.'.join(map(str, self.version)) + vstring = string.join(map(str, self.version), '.') if self.prerelease: vstring = vstring + self.prerelease[0] + str(self.prerelease[1]) |