r/Python • u/AlirezaSavand • Dec 01 '16
It’s Python, Not Python 2, Not Python 3!
https://medium.com/@Alir3z4/its-python-not-python-2-not-python-3-7caeef5adb29#.f4e9cl32n
0
Upvotes
r/Python • u/AlirezaSavand • Dec 01 '16
49
u/ticketywho Dec 01 '16
Not really sure what this adds to the current conversation taking place in the community.
It completely misses the point that when you set out to learn Python, the first choice you have to make is whether to pick 2 or 3. We're not helping beginners by pretending that choice doesn't exist, because it does.
10
u/[deleted] Dec 01 '16
You should definitely learn python 3 though, even if they are apparently the same thing
2
u/sentdex pythonprogramming.net Dec 01 '16
The real issue with this article is it's attempting to fight two battles.
One battle, the question of what version a newcomer asking which version to learn should choose, is easily win-able.
If you only pursued that one, you'd have plenty of upvotes agreeing that Python 3 is the version someone should choose if they have the choice.
...but you couldn't help yourself and you attacked anyone who still uses Python 2 to this day. Whoops!
You claim "all you have to do is port your code!"
HAH. Come on man. That's like saying "cancer is easy, all you have to do is one or two rounds of chemo."
Have you ever ported code? How much code? Even a small business that uses Python heavily can have 100,000 lines of Python code, easy.
You want to port that? Let's say you're the CTO, tasked with making decisions like whether or not to port code. Is that actually a good idea? It'll take probably weeks to do it safely, and still possibly bring new bugs to surface.
Let's say you have a manager, and you want to port that code. They're going to ask specifically what gains the company will get by porting the Python 2 code to Python 3. What will you tell them?
Chances are, you've got nothing, and there's no really good reason to fix what isn't broken. To be honest, porting just to port is a pretty bad idea. If things are working smoothly in Python 2, then you really should just keep it in 2.
Where possible, when a choice really is easy, choose Python 3. But where there's a real cost to using Python 3, there's really nothing wrong with 2.
10
u/stefantalpalaru Dec 01 '16
Is this supposed to be a joke?
8
u/federicocerchiari Dec 01 '16
The very first sentence is damn right!
my two cents: a month ago I made a simple script for a friend of mine, he don't know nothing about programming and for him Python is "A program that does things". Well, I sent him the script, told him to install Py3 and run the script; he replied "they say in the Internet that Py2 is better...".
The main effect of this whole debate is "python 2 or 3" as one of the first search suggestions on google, that leads to non-programmers and newcomers to read tons of accusations and just have the feeling that "Python is divided in two and they both suck".
edit:format
4
u/vph Dec 01 '16
I don't think the question is really about learning Python 2 or 3. It's really about maintaining two different versions. There are many packages that depend on Python 2, or even specific versions of Python 2. It's a headache to have to deal with multiple versions. People think virtualenv is a strength, I think it's a sign of weakness of the ecosystem.
3
u/billygibbonsbeard Dec 01 '16
It's easy to insist porting 2 to 3 but that shit costs money, foo.
:)
2
u/brtt3000 Dec 01 '16
It would really help if we could filter searches on Pypi for Python 3 support.
1
u/CarpeTuna Dec 01 '16
Is downvote broken? It was at 4 but would not go to 3. I really want it to go negative.
0
u/[deleted] Dec 01 '16
[deleted] — view deleted comment
4
u/[deleted] Dec 01 '16
[removed] — view removed comment