Quite a nice presentation! But I just wanted to point out that the title is a bit presumptuous. I don't refuse to upgrade to Python 3, it's that the default Python for most distributions is 2 (sometimes as far back as 2.6). If you want to write a user-space tool with Python you can either require additional dependency setup, bundle a full interpreter with your package, or just write Python 2.7/6 code that is forward…
Python 3 has been available on most dists for 5-10 years.
New features you can't use unless you are in Python 3
31–40 of 264 posts
Re: New features you can't use unless you are in Python 3
#32Does anyone use 2.x by choice? I've only seen it required as to not break legacy code.
edit: I don't mean this as a knock on py3. All I'm saying is that my situation and uses for python allow me to be apathetic towards 2 vs. 3.
Re: New features you can't use unless you are in Python 3
#33Earlier quoted context omitted.
It was source-level incompatible with older code so it couldn't be used as a smooth transition like... almost any other language upgrade I've ever seen. Breaking code like this was a big mistake in my opinion - it resulted in many people sticking on the old version for code and library compatibility. There are still libraries which don't work on Python 3, though now fairly few of them. In addition to that, the unicod…
`hex` and `fromhex` were added to the bytes type in Python 3.5. And while it isn't trivial, it is easy enough to just deal with bytes in 3.x.
Re: New features you can't use unless you are in Python 3
#34Quite a nice presentation! But I just wanted to point out that the title is a bit presumptuous. I don't refuse to upgrade to Python 3, it's that the default Python for most distributions is 2 (sometimes as far back as 2.6). If you want to write a user-space tool with Python you can either require additional dependency setup, bundle a full interpreter with your package, or just write Python 2.7/6 code that is forward…
Python 3 has been available on most dists for 5-10 years.
Re: New features you can't use unless you are in Python 3
#35The way 2.x -> 3.x was handled is/was/will is an absolute disaster. Upgrading simple scripts is a non-issue. Larger projects seem to always be a horrible pain.
Re: New features you can't use unless you are in Python 3
#36My personal favorite is native support for IP addresses, introduced in python 3.3[0]. Makes IP math and address validation so much easier. [0] https://docs.python.org/3/library/ipaddress.html
Re: New features you can't use unless you are in Python 3
#37Re: New features you can't use unless you are in Python 3
#38Quite a nice presentation! But I just wanted to point out that the title is a bit presumptuous. I don't refuse to upgrade to Python 3, it's that the default Python for most distributions is 2 (sometimes as far back as 2.6). If you want to write a user-space tool with Python you can either require additional dependency setup, bundle a full interpreter with your package, or just write Python 2.7/6 code that is forward…
Python 3 has been available on most dists for 5-10 years.
Re: New features you can't use unless you are in Python 3
#39Re: New features you can't use unless you are in Python 3
#40I'm impressed how much Python seems stuck on older versions. What went wrong?
It was source-level incompatible with older code so it couldn't be used as a smooth transition like... almost any other language upgrade I've ever seen. Breaking code like this was a big mistake in my opinion - it resulted in many people sticking on the old version for code and library compatibility. There are still libraries which don't work on Python 3, though now fairly few of them. In addition to that, the unicod…
In term's of code reliability, Python 3's approach is much more sane.