Live data from Hacker News

Sunsetting Python 2

python.org

531–540 of 733 posts

Re: Sunsetting Python 2

#531

Earlier quoted context omitted.

I think a fairer interpretation of the situation is "Well, we have to rewrite and test all this code anyway, so the barrier to picking another language to go forward with is quite low right now."

That's a corollary to this, for sure, particularly if there's another language that would be more appropriate. That said, the OP seemed to be moving on primarily out of annoyance. Assuming that's the case and Python is the best language for the project (keeping in mind things like "I can hire the same quality people who WANT to work in this language), I stand by my (still slightly tongue in cheek) position.

A question comes to my mind on the desires of developers to work on Python projects. Would it be fair to say Rust or Go might have more desirability these days? The WANT question makes me think this is a bit more than simple annoyance but provides an excuse to travel to greener pastures.

Re: Sunsetting Python 2

#532

Earlier quoted context omitted.

But... why? Python 3 has been "good enough" since 3.4. By 3.6, it was markedly better than 2. With the upcoming 3.8, it seems to be better in every way (including performance!). I loved Python 2 for a long time. It was a beautiful language. But after seriously using 3, I would never go back. As in, I would turn down job offers involving Python 2 in any other context than "we're hiring you to help us upgrade".

> By 3.6, it was markedly better than 2. Better how? Or better at what? It's likely that our opinions will be different but I've got an open mind and I'm genuinely curious about your experiences and opinion. (I hated PEP 572 at first but then some comment here on HN made me rethink and change my mind.)

f-strings. Enum. Dataclasses. asyncio. Type annotations as code. An explicit separation between bytes and strings. I love each of these and use them regularly. It's not that 2.7 is some abomination I can't stomach, but more that 3.[recent] is all of the things I appreciated about 2.7, plus a million little quality of life and performance enhancements that make it just that much more pleasant to use. I could live without each of those things individually, but would not be willing to give them all up.

Re: Sunsetting Python 2

#533
post #521

If it weren't a forced update, I personally have not found much in Python 3 that is a benefit over 2. It seems the unicode support is the big change, but I just use ASCII encoding, so unicode doesn't matter to me.

> but I just use ASCII encoding No you don't! :D

Search for 'default' https://docs.python.org/2/howto/unicode.html

Re: Sunsetting Python 2

#534

Earlier quoted context omitted.

I think he means more 'craftsman' vs. 'builder' in mentioning professionals. I don't think there's a time I can remember when Norm Abram (probably now one of the greatest or at least most prominent carpenters of a generation) ever mentioned the particular tool brands he was using. And looking back on earlier seasons of This Old House, he was hand-nailing thousands of nails a day (nowadays he and everyone else often u…

Every "craftsman" I know is fanatical about the tools they . use, be they carpenters, chefs, artists, or programmers. Also, let's just call a craftsman what they are - experienced builders.

Weird. I'd say the attitude exhibited by De Niro's character Sam in Ronin is more common. They're just tools.

You want it written in C for a 16bit bargain basement ALU? I can do that. You want two implementations, one in Pascal and the other in PHP? Not a problem. You want my advice? No? That's fine too, the advice is expensive and who knows after all these years if it's even worth anything.

Re: Sunsetting Python 2

#535

While the article is very "matter-of-fact" about the sunset period and what it means to those that still use Python 2, I'm still surprised that it's taken this long to finally close support. I had assumed that their approach would be to fork the language into a new language (call it something like Liasis) and to allow one of the big-name contractors that specialise on Python 2 to take ownership of it. As an aside, a…

JP Morgan, isn't it?

The platform can already run in python 3. It's possible that the team you interviewed with wasn't aware of that.

Like all big companies, personal experience varies with the team and the part of the company you're in.

Re: Sunsetting Python 2

#537

Earlier quoted context omitted.

I am not sure what you want to say with your comment? That you move to another language as soon as there are breaking changes because you are invested as a user and therefore dissapointed? While this is a valid reason, it's just the way languages work. Some prioritize getting the language right and other backwards-compatibility. If your argument is categorical (languages that make breaking changes are bad) then indee…

This is a bit and oversimplified, but it also seems a bit weird, to me, to respond to a situation of "man it's going to be really annoying to rewrite all this code" with "You know what sounds like a better option? Rewriting all this code!"

It’s a bit less absurd when the person gave the reason that they feared a similar breaking python release in the near future. This might still be incorrect of them, but to me anyhow it’s not strange or silly reaction.

Re: Sunsetting Python 2

#538
post #240

Python 2 to 3 (at least by 3.3 or so) was one of the easiest transitions I've ever done. There's a library ("six") to help, and in almost all cases you can write 2-and-3 compatible code, which means you can go piece-by-piece. (Unless your manager makes drive-by commits of py2-only code, months after you all agreed that all new code should be py3-compatible, and then leaves town for a multi-week vacation...) Dependenc…

> Python 2 to 3 (at least by 3.3 or so) was one of the easiest transitions I've ever done.

I suppose you don't use Java.

Re: Sunsetting Python 2

#539

Earlier quoted context omitted.

"Hey Joe, why did our customer database get leaked and published on a dark-net site?" "Hey boss, we're using an outdated programming language for which security updates are no longer provided, because we were told there's no budget for fixing technical debt." "Congratulations, you're fired." Same outcome either way... might as well make some effort to do the right thing along the way...

You're missing the point. If decision makers saw it coming that Python will just break in two, they would have never allowed its use. Other "serious" programming languages rarely if ever break, and when they do, it's usually minor. Python2 will almost certainly still remain in widespread use and it will still get security updates through alternative distribution channels. It's not that much work fixing such relativel…

It's not "broken"... Python3 is just the evolution of the language. Languages change and evolve, some more and some less than others. Sure, Java or COBOL maybe have done a better job of not breaking backwards compatibility, but Python 3 isn't exactly Perl 6 here.

But hey, if some 3rd party group effectively forks the language and maintains a Python2 branch after the official EOL date, good on them. But I'd argue that using that is risky in the same way that using a Pale Moon or Waterfox is (arguably) riskier than using mainstream Firefox.

Re: Sunsetting Python 2

#540
post #441
post #27

Earlier quoted context omitted.

They already have one - look in their type checker repo for patches that add certain Python 3 features (type annotations) to Python 2.

That's sort of hilarious... What are the incentives that prevent Google from upgrading their python 2 scripts to python 3? I guess it's more productive globally to stick with a supported version of Python 2.

Not the one you're responding to, but there are many cases where Python is used in the role of a shell script replacement eg. build scripting and test suite automation that wouldn't benefit from migration and, in fact, would suffer from half-assed migration attempts with little or no real-world testing.
Post reply on HN