Earlier quoted context omitted.
if performance is a problem, then start rewriting the critical pieces right now because python 2 also isn't for you. mypy is a much better type system than Java, btw, if that's what you're after.
> if performance is a problem, then start rewriting the critical pieces right now because python 2 also isn't for you. You say it as if that would be a strange position to be it, but it's a common situation. A lot of time you start with the faster to prototype / more familiar language, and outgrow it. That's what companies do after they grow so much that a language such as Python/Ruby/PHP is not doing it for them any…
New features you can't use unless you are in Python 3
231–240 of 264 posts
Re: New features you can't use unless you are in Python 3
#232My 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
> address validation just try: socket.inet_aton
Re: New features you can't use unless you are in Python 3
#233Open page. Nothing works. Enable their scripts. First slide shows but nothing works - except the link to the pdf version. Why not give a link to the pdf version in a element?
Re: New features you can't use unless you are in Python 3
#234Earlier quoted context omitted.
Python 3 has been available on most dists for 5-10 years.
What I said was the default version of Python is old on most distributions. For example, CentOS 6 ships with Python 2.6 out of the box. Even faster moving distros (like Ubuntu) are still trying to make Python 3 the default (although at least Ubuntu ships with both 2.7 and 3.4+ out of the box).
Re: New features you can't use unless you are in Python 3
#235Open page. Nothing works. Enable their scripts. First slide shows but nothing works - except the link to the pdf version. Why not give a link to the pdf version in a element?
I'll never understand those who break the internet on purpose and then complain that nothing works, and that the people actually spending money and doing work should cater to their niche tastes. Please stop. Thanks.
Maybe if more people resisted the temptation to use the latest and shiniest frameworks where it isn't warranted, I wouldn't have to upgrade my otherwise perfectly functional hardware every five years because it just can't handle all of today's most fashionable abstraction layers over plain HTML.
" rel="nofollow">http://motherfuckingwebsite.com/>
Re: New features you can't use unless you are in Python 3
#236Earlier quoted context omitted.
That’s a giant can of worms. One example problem: Python 2 has a type of class (old-style) that doesn’t exist in Python 3. What happens when you try to pass this type of class or one of its instances between the languages? There’s a bunch of stuff like that. You’d end up with a very weighed-down interpreter with a bunch of caveats if you ended up with one at all.
Would doing that then deprecating those features after 5 years or so not be better than what's happened with the Python 3 transition? I'm curious what options there are for how to make such a transition smoother.
(And yes, making strings text rather than bytes was really that important. Python 3 would be a huge improvement even if it were only that and some other safety things like removing the default ordering of incompatible types.)
Re: New features you can't use unless you are in Python 3
#237Earlier quoted context omitted.
As an independent contractor maintaining large Python 2 codebases, your comments really hit home for me. I only have a portion of my time each month to maintain and develop features for them. If the Python 2 floodgate ever breaks, I am more likely to rewrite the system in a statically typed language. Even today, I am tempted. I know that a sibling mentions the ridiculousness of the situation, but a forced depreciatio…
This. I don't think people realize that there are fixed costs that are born in making these kinds of migrations so that migrating to Java from python is not 100x more work than migrating from python 2 to python 3. There is no such thing as a small breaking change to a runtime. Maybe one way of thinking about it is to take a hard drive full of data and randomly flip a few bits. Then ask what the effort is to find and…
If your code base is a big pile with no tests.. well you dug that grave.
Re: New features you can't use unless you are in Python 3
#238Earlier quoted context omitted.
Python 2 is a vastly more complex language compared to Python 3. Just try to name the basic classes of types that exist in Python 2. Hint: Cannot be counted on two hands.
Well, try this for me, especially that you didn't use searchable terminology, so it's hard to confirm what you're saying. And then tell how much of that is important for typical code.
Re: New features you can't use unless you are in Python 3
#239Earlier quoted context omitted.
This. I don't think people realize that there are fixed costs that are born in making these kinds of migrations so that migrating to Java from python is not 100x more work than migrating from python 2 to python 3. There is no such thing as a small breaking change to a runtime. Maybe one way of thinking about it is to take a hard drive full of data and randomly flip a few bits. Then ask what the effort is to find and…
If you actually have tests it's not half as bad as you are making it out to be. If your code base is a big pile with no tests.. well you dug that grave.
Re: New features you can't use unless you are in Python 3
#240How old is Python 3 now? I've always used Python for a "miscellaneous task" language, and still do... and even I find "...because you refuse to upgrade" a bit insulting. If I used it for something serious, even more so. The 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.
I used to think like you, but when i started actually using Python 3 it all was a lot less worse than i've expected it to be from reading Hacker News comments. YMMV, but converting existing code for me usually didn't amount to more than adding parentheses around print statements. The proper support for unicode alone was enough of a reason to upgrade for me.