davide moro added the comment:
Thanks and sorry for the duplicate!
Il giorno gio 1 nov 2018 alle ore 00:53 Éric Araujo
ha scritto:
>
> Éric Araujo added the comment:
>
> Please discuss on #14894
>
> --
> resolution: -> duplicate
> stage: -> resolved
> status: open -> closed
>
Éric Araujo added the comment:
Please discuss on #14894
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> distutils.LooseVersion fails to compare number and a word
___
Python tracker
Steven D'Aprano added the comment:
There is no need to split the relevant code into a third-party website,
especially when it is so small and can be included in-line here.
Python 2.7:
py> import distutils.version
py> distutils.version.LooseVersion('7') >
New submission from davide moro :
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: