|
|
Subscribe / Log in / New account

Python 2 is Python. Python 3 is not.

Python 2 is Python. Python 3 is not.

Posted Apr 4, 2014 15:13 UTC (Fri) by david.a.wheeler (subscriber, #72896)
In reply to: The point being? by cglass
Parent article: Pyston — a new Python 2.7 implementation

Currently, Python 2 is Python. Python 3 is not, in the sense that many programs and libraries have not transitioned Python 3, nor is there evidence that they will do so at any time in the future. Most people I know who program in Python *only* use Python 2.

The entire Python 3 transition was badly botched. What *SHOULD* have happened was that a *SINGLE* implementation should have supported both Python 2 and 3, as has always been true before. As it is, Python 3 requires a flag day transition, which has ALWAYS been a tremendously difficult and high-risk approach to transition. I like Python 3, but Python 3 just doesn't have enough advantages to justify the pain.

Maybe someday most Python programs will be written in Python 3. Today is not that day.


to post comments

Python 2 is Python. Python 3 is not.

Posted Apr 4, 2014 16:32 UTC (Fri) by stonebig (guest, #96410) [Link] (6 responses)

In non-english and non-linux countries, python2 is a pain, and Python3 was a deliverance.
I agree It's a little strange that the python3000 was less then kind for the transition user, but python3.3 and + are now ok, and a real pleasure for not-only-english writing people.

In education, there is no question the python3 is the way to go, if we want to use our not-always-english spelling in our programs.

I even know at least one american (technical) leader that is in favor of python3 transition now :
https://twitter.com/ellisonbg/status/444863447319080961

Python 2 is Python. Python 3 is not.

Posted Apr 4, 2014 17:19 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link] (5 responses)

Uhm, I'm from a non-English speaking country. I don't have ANY problems with non-Latin identifiers in Py2.

Python 2 is Python. Python 3 is not.

Posted Apr 4, 2014 22:15 UTC (Fri) by juliank (guest, #45896) [Link] (4 responses)

Of course you do.

You cannot use them in your code without a special encoding header.

Automatic unicode <-> str conversion uses ascii by default, forcing you to do crazy stuff.

and more.

Python 2 is Python. Python 3 is not.

Posted Apr 4, 2014 22:20 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

And how does this change with Py3k?

How would Python guess that when I write: "Ýòî òåñòîâûé èäåíòèôèêàòîð" I actually mean: "Это тестовый идентификатор"?

Python 2 is Python. Python 3 is not.

Posted Apr 5, 2014 0:51 UTC (Sat) by bluss (guest, #47454) [Link]

utf-8 is the default code encoding in Py 3.

Also you said /identifiers/. Py 3 allows unicode identifiers: meaning variable names! For example α = 1; β = 2; is accepted.

Python 2 is Python. Python 3 is not.

Posted Apr 4, 2014 22:23 UTC (Fri) by mpr22 (subscriber, #60784) [Link]

You cannot use them in your code without a special encoding header.

It's not clear to me that that's a problem per se. Especially if it's a header that can be conveniently embedded in one's new-file boilerplate.

Python 2 is Python. Python 3 is not.

Posted Apr 6, 2014 9:20 UTC (Sun) by job (guest, #670) [Link]

Unicode in Python has always been a pain. Parts of the standard library explode when exposed to it in unexpected ways. However I much prefer that situation than Python 3 which is much more subtly broken.

While the new Unicode handling may look good on paper it completely breaks down in practice. Read what Armin Ronacher wrote on the subject in his blog if you haven't already, he understands the issues involved much better than I do.

Python 2 is Python. Python 3 is not.

Posted Apr 4, 2014 17:22 UTC (Fri) by bluss (guest, #47454) [Link] (5 responses)

Well, if the transition sucked there are only two things to do: 1) Learn from it and make sure it doesn't happen that way again, and 2) Get on with it. We can't let the community sit around and sulk instead of moving forward. Procrastination doesn't make the problem go away.

Python 2 is Python. Python 3 is not.

Posted Apr 4, 2014 17:33 UTC (Fri) by mpr22 (subscriber, #60784) [Link]

Actually, you have no option but to let the community sit around and sulk if they want to, since you have no means of compulsion. You can, of course, take whatever strategy you please (within reason) to persuade them to do otherwise.

Python 2 is Python. Python 3 is not.

Posted Apr 5, 2014 11:44 UTC (Sat) by pboddie (guest, #50784) [Link] (2 responses)

Yes, I also find that calling people who write working software (to the best of their ability and according to the prevailing best practices) "lazy" is a great motivator, not at all likely to alienate anyone, and will absolutely not confuse or dissuade potential adopters of a technology. "Keep up, we've changed some stuff" and "we're having so much fun doing this" are exactly what people want to hear as they struggle under a mountain of actual, productive work.

Or as someone who doesn't necessarily regard themselves as a Python expert put it recently, "Why did they have to make Python 3 incompatible with Python 2?" I guess we're still waiting for the answer to that question.

Python 2 is Python. Python 3 is not.

Posted Apr 5, 2014 21:25 UTC (Sat) by bluss (guest, #47454) [Link] (1 responses)

I have a positive mindset. I haven't called anyone lazy.

Python 2 is Python. Python 3 is not.

Posted Apr 5, 2014 23:54 UTC (Sat) by pboddie (guest, #50784) [Link]

Well, maybe not, but I get the impression reading the various mailing lists and the rhetoric about people sticking with Python 2 that those people are regarded as lazy people who aren't "doing their bit for the cause", a bit like individuals living unhealthy lifestyles who supposedly need a personal trainer sent to their door to encourage them to sort themselves out.

Closer to the topic, the other positive thing that seems to have come out of Dropbox recently, although I don't recall any editorial mention of it here, was that Python 2.7 will get some continued security attention in the form of backported "enhancements", with Guido van Rossum actually berating someone who suggested that porting to Python 3 was the only proper way of deploying systems adhering to contemporary security standards and practices, noting that Dropbox certainly can't afford to take that path.

Python 2 is Python. Python 3 is not.

Posted Apr 10, 2014 3:56 UTC (Thu) by david.a.wheeler (subscriber, #72896) [Link]

> Well, if the transition sucked there are only two things to do: 1) Learn from it and make sure it doesn't happen that way again, and 2) Get on with it. We can't let the community sit around and sulk instead of moving forward. Procrastination doesn't make the problem go away.

You're ignoring what most people are ACTUALLY doing, which is option 3: Ignore Python 3, and keep using Python 2. After all, that's where all the existing code and libraries are.

Hey, I actually *like* Python3. The problem isn't the destination, it's the overly-difficult transition path to get there. If you could load Python3 and Python2 programs in a single process - and there is *NO* technical reason this cannot be done - then you could transition gradually instead of having a flag day. As it is, you have to convert all libraries and every file simultaneously. That's just rediculous. It is *possible* to do it, but many of us need to actually accomplish things instead.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds