On Wed, 26 Sep 2018 at 20:27, Petr Viktorin <encu...@gmail.com> wrote:
> I'd much, much rather explain that `sys.version[2]` is not correct, and
> solve the "python310" < "python39" problem.

One of the perks of the way PEP 425 deals with this [1] is that ASCII
underscores sort higher than ASCII digits, so:

    >>> "py31" < "py39" < "py310" < "py311"
    False
    >>> "py31" < "py39" < "py3_10" < "py3_11"
    True

(I'm not sure if that's true for all collation orders, but if we find
one where it isn't, then we'd just specify a collation order to use
for Python version comparisons)

Cheers,
Nick.

[1] https://www.python.org/dev/peps/pep-0425/#python-tag

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
python-committers mailing list
python-committers@python.org
https://mail.python.org/mailman/listinfo/python-committers
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to