MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/itzn13/an_update_on_python_4/g5ibf0x?context=9999
r/Python • u/anyfactor Freelancer. AnyFactor.xyz • Sep 16 '20
389 comments sorted by
View all comments
-11
3.9 -> 3.10
This makes me irrationally angry.
8 u/Jethro_Tell Sep 16 '20 Why? -3 u/Leav Sep 16 '20 Because 3.10 = "3.1 with more precision" to engineers and scientists and basically all non-developer users.How would python sort these lists: [3.8,3.9,3.10] or ["3.8","3.9","3.10"]? 14 u/Karnyl Sep 16 '20 If you used a library aware of how versions should be sorted, like semver or distutils.version, then they would be sorted correctly.>>> from distutils.version import LooseVersion>>> versions = ["3.8","3.9","3.10"]>>> sorted(versions, key=LooseVersion)"3.8","3.9","3.10" → More replies (2)
8
Why?
-3 u/Leav Sep 16 '20 Because 3.10 = "3.1 with more precision" to engineers and scientists and basically all non-developer users.How would python sort these lists: [3.8,3.9,3.10] or ["3.8","3.9","3.10"]? 14 u/Karnyl Sep 16 '20 If you used a library aware of how versions should be sorted, like semver or distutils.version, then they would be sorted correctly.>>> from distutils.version import LooseVersion>>> versions = ["3.8","3.9","3.10"]>>> sorted(versions, key=LooseVersion)"3.8","3.9","3.10" → More replies (2)
-3
Because 3.10 = "3.1 with more precision" to engineers and scientists and basically all non-developer users.
How would python sort these lists: [3.8,3.9,3.10] or ["3.8","3.9","3.10"]?
14 u/Karnyl Sep 16 '20 If you used a library aware of how versions should be sorted, like semver or distutils.version, then they would be sorted correctly.>>> from distutils.version import LooseVersion>>> versions = ["3.8","3.9","3.10"]>>> sorted(versions, key=LooseVersion)"3.8","3.9","3.10" → More replies (2)
14
If you used a library aware of how versions should be sorted, like semver or distutils.version, then they would be sorted correctly.
>>> from distutils.version import LooseVersion>>> versions = ["3.8","3.9","3.10"]>>> sorted(versions, key=LooseVersion)"3.8","3.9","3.10"
>>> from distutils.version import LooseVersion
>>> versions = ["3.8","3.9","3.10"]
>>> sorted(versions, key=LooseVersion)
"3.8","3.9","3.10"
→ More replies (2)
-11
u/NTWK_Identifier Sep 16 '20
This makes me irrationally angry.