[New-bugs-announce] [issue35129] Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x
davide moro
report at bugs.python.org
Wed Oct 31 18:28:42 EDT 2018
New submission from davide moro <davide.moro at gmail.com>:
I noticed that with the python2.7 version of distutils.version.LooseVersion let you compare '7' with 'xp' without exceptions (e.g., LooseVersion('7') > LooseVersion('xp')).
If you do the same with python3.6 or python3.7, you'll get the following exception:
* TypeError: '<' not supported between instances of 'int' and 'str'
You can see the full example with complete traceback and differences between python2.x and python3.x here:
* https://pastebin.com/kAwUTihe
Thanks,
davide
----------
components: Distutils
messages: 329018
nosy: davide moro, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x
type: behavior
versions: Python 3.6, Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35129>
_______________________________________
More information about the New-bugs-announce
mailing list