diff options
Diffstat (limited to 'Lib/distutils/version.py')
| -rw-r--r-- | Lib/distutils/version.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/distutils/version.py b/Lib/distutils/version.py index de20e21..96b6552 100644 --- a/Lib/distutils/version.py +++ b/Lib/distutils/version.py @@ -306,11 +306,11 @@ class LooseVersion (Version): # from the parsed tuple -- so I just store the string here for # use by __str__ self.vstring = vstring - components = filter(lambda x: x and x != '.', - self.component_re.split(vstring)) - for i in range(len(components)): + components = [x for x in self.component_re.split(vstring) + if x and x != '.'] + for i, obj in enumerate(components): try: - components[i] = int(components[i]) + components[i] = int(obj) except ValueError: pass |
