r/Python • • May 26 '14

Python 3 is killing Python

https://medium.com/@deliciousrobots/5d2ad703365d/
0 Upvotes

147 comments sorted by

View all comments

73

u/252003 May 26 '14

In the time it took to write that article he could have ported a hundreds of lines of python 2 to python 3. If people spent as much time upgrading as they spent time complaining about having to upgrade we would have made a lot of progress. Is creating a third version of python that is worse than the current one but can use old libraries a good way or is working on moving forward and developing the newest versions of our language the best way.

46

u/mitsuhiko Flask Creator May 26 '14

If people spent as much time upgrading as they spent time complaining about having to upgrade we would have made a lot of progress.

That's a pretty pointless argument for a variety of reasons. The biggest one is that there is no reason to upgrade because Python 3 does not have a business benefit for lots of people.

As a person maintaining open source code Python 3 for me doubles my work for zero benefit as I'm not using Python 3 myself.

As a person working in a company upgrading to Python 3 means that I lose compatibility to the ecosystem and PyPy. If I support both, then why not just continue using Python 2?

Aside of that, there is so much stuff in Python 3 that is barely reviewed because there are no users that it's really damn hard to argue that it's unconditionally a better language.

//EDIT: arguing with "if people" is not useful in general anyways because a system would obviously be most efficient if all actors in it, would share the same ideals. But that's not how the world works. You could use the same argument to ask for why we don't have world peace.

22

u/bastibe May 26 '14

So write your code to be compatible with 2 and 3. In most cases, this is very easy, and the right way to go. Many open source projects do it that way (mine included).

Also, if maintaining a Py3 version doubles your work, you are doing it wrong. Running your tests in a different interpreter should in no way double your work.

20

u/mitsuhiko Flask Creator May 26 '14

Guess I'm doing it wrong then.

10

u/flying-sheep May 26 '14

jup. bilangual python is less fun than python 3, but less work than maintaining two forks.

1

u/marky1991 May 26 '14

I guess so.

3

u/v3ss0n May 27 '14

I do hope You guys know that Mitsuhiko is developer of the popular web microframework Flask...

2

u/marky1991 May 27 '14

That doesn't change anything. A doubling of work implies that you're effectively got two completely independent code flows. If that is the case, you're doing it wrong, whether you're guido, mitsuhiko, Awful coder #4,003 or anyone else.

2

u/v3ss0n May 27 '14

What i mean is he built a successful web framework that supports both py2 and py3 , are you sure he is doing it wrong?

4

u/marky1991 May 27 '14

"A doubling of work implies that you're effectively got two completely independent code flows. If that is the case, you're doing it wrong..."

1

u/crowseldon Jul 04 '14

I don't think he is suggesting that his work is wrong but that he maybe finds fault in something just because he is using the wrong methods that double efforts when he shouldn't have to.

The result will be just as good with less effort.

3

u/[deleted] May 26 '14

Only if you don't care if they pass. :)

5

u/mfukar May 26 '14 edited May 26 '14

That's a pretty pointless argument for a variety of reasons. The biggest one is that there is no reason to upgrade because Python 3 does not have a business benefit for lots of people.

I would argue that if those people (lots? who are they?) don't have a business reason to upgrade to Python 3, they don't have a business reason to complain about it, either.

4

u/Kaelin May 26 '14

Most people don't complain about it or give a fuck about Python 3. I care about Python 3 as much as I care about Perl 6.

3

u/Categoria May 26 '14

Perl 6 has some interesting stuff I hear. Also it no longer pretends to be the successor to anything.

0

u/[deleted] May 26 '14

[deleted]

11

u/twotime May 26 '14

The business case here is that languages which cannot keep b/w compatibility at reasonable level should not be used for any future projects... Existing projects are either to be mothballed or rewritten in another language..

Welcome to the real world.

0

u/[deleted] May 26 '14

[deleted]

4

u/twotime May 26 '14

Such breakage is tolerable for a language which is just starting. It's a suicidal mistake for a language with massive deployed code base.

Two more observations.

A. it's not a binary choice, breaking changes could have been introduced with deprecations/future imports/etc which would have been slower (but then it might still be faster than what we've got with python3 ;-)

B. given that the cost of b/w compatibility breakage is so high, it only should be broken for clear improvements. Python 3 does not meet this requirement IMHO:

B1. print function vs print statement. A wash.

B2. unicode by default. A mess. (as in: it has broken about as many things as it has fixed)

B3. dictionary interface changes. (.keys() is now an iterator). A minor improvement

etc, etc, etc

1

u/john_m_camara May 26 '14

Show me instances where Python 3 is being used in a production environment doing something meaningful. That would be a business case.

1

u/Citrauq May 26 '14

I use python3 for (almost) all new projects at work. We usually write django apps with a REST API for a javascript (angular) frontend.

0

u/john_m_camara May 26 '14

How about providing the name of the company or website so we can have a chance of judging how meaningful your use of Python3 is. So far I have only come across a few small startups and a few individuals using Python 3 in production and in all cases they were very trivial apps to build and most had none to just a couple of dependencies on 3rd party libraries.

0

u/reallyserious May 26 '14

Where are you going with this? Am I supposed to read this as people using py3 don't do meaningful things?

3

u/john_m_camara May 26 '14

I'm honestly interested in finding out at least one serious project using Python 3 in a production environment. Everyone I know that earns a living programming and does Python development refuses to run their apps in production under Python 3. Many of them are willing to provide Python 3 support for libraries they develop so it's not the case that they don't want Python 3 to be successful it just they are not willing to take the risk or can't make the change due to dependencies that are not supported.

3

u/[deleted] May 27 '14 edited May 27 '14

Just curious, how much Python code base is related to web development? The reason I ask, it seems these type of arguments I see seem to center around Python being used among web developers. But Python is being used in so many different domains. So it may be true Python 3 may not be used a lot in production in the web development world, but in the scientific and data analysis world, Python 3 is being used widely. I don't have numbers to back it up, but at my Fortune 500 company, we use Python for data or statistical analysis. The Python 3 code we use, use the full scientific stack (et. el. numpy, scipy, matplotlib) without problems. We are using Python 3 for making critical business decisions, which include whether or not our company will issue million+ dollar recalls.

So basically I am trying to say that we should remind ourselves that Python is being used in other domains besides web development.

5

u/mitsuhiko Flask Creator May 27 '14

I work with web and computer games. Everybody i know uses Python 2. I have yet to see a company of significance using Python 3. In fact: i don't know of a single company using Python 3 I think.

→ More replies (2)
→ More replies (1)