
Ask HN: Why all the hate for Python 3? - akulbe
Zed Shaw makes a case against Python 3 in his LPTHW, now. Personally, it rubs me the wrong way.<p>Another guy speaks and makes a rebuttal (https:&#x2F;&#x2F;eev.ee&#x2F;blog&#x2F;2016&#x2F;11&#x2F;23&#x2F;a-rebuttal-for-python-3&#x2F;)<p>Guido has already said that Python 3 is the future of the language and development on Python 2 will come to an end.<p>Why does this seem to be so hard to accept? Why all the hate for 3.x?<p>I don&#x27;t have a dog in the fight, but as a newcomer to the language, it&#x27;s a bit unnerving.
======
CmdrSprinkles
In large part because python 3 just wasn't worth using for the first few
(probably five or six) years. The big reason so many of us use python is
because of the wide range of libraries and modules that no longer worked.

And when selling it to people, it was usually "Oh, just do X, Y, and Z and you
can port this library to Python 3". Not to mention all of the "Just write your
python scripts to be backwards compatible".

So, as a user, I saw no reason to push it. A lot of hassle to not even really
take advantage of anything to stay backwards compatible. And the moment we
found a library that wasn't ported, we were back to 2.x.

Not to mention the zealots who would then explain to me how I was horribly
wrong and that my firm is wrong and that we are bad people and blah blah blah
blah blah.

These days it is a much easier sell in terms of compatibility as most (not
all) major libraries have migrated. My personal work tends to be in python 3
and we try to make our in-house tools work for both (but 2.x is the priority).
But most of our users are still going to use 2.x simply because there is no
compelling reason to migrate (even if the migration is "Put parentheses after
'print'").

And the zealots are still annoying as hell.

And if 2.x really stops getting supported? I hope we'll migrate to 3, but
there will be a lot of research and soul-searching first. Because now there
are other languages with similar capabilities and if we are going to have to
teach everyone something new, we might as well do it right.

------
ploggingdev
If you are a beginner, choosing Python 3 is a no brainer.

One of the main reasons for all the hate towards Python 3 is because it is not
backwards compatible with Python 2. So people who have a lot invested in
Python 2 have to port the codebase to Python 3. Another issue is that some
libraries have not been ported to Python 3. This is becoming less of an issue
as all the major libraries have been ported to Python 3.

Anything Zed Shaw says (or anyone for that matter), cross check the facts
before drawing conclusions.

~~~
joeclark77
What's more, choosing Python 3 was already a no-brainer for someone like me
who was a Python beginner _five years ago_.

Don't worry... eventually we'll get Python 4 or something, and then all of us
who learned Python 3 first will become the grumbling holdouts...

------
coldtea
> _Guido has already said that Python 3 is the future of the language and
> development on Python 2 will come to an end._

That doesn't mean anything. Beyond a certain point a language is beyond the
control of its original creator.

------
brudgers
Zed Shaw's position is that Python 3 is not suitable for the intended audience
of _Learn Python the Hard Way._ His rationales (along with his response to
criticism) was laid out a recent essay: [https://zedshaw.com/2016/11/24/the-
end-of-coder-influence/](https://zedshaw.com/2016/11/24/the-end-of-coder-
influence/)

Anyway, Zed Shaw is, in my opinion, worth paying attention to. This essay
seems particularly relevant to the current kertuffle:
[https://web.archive.org/web/20120821234313/http://learncodet...](https://web.archive.org/web/20120821234313/http://learncodethehardway.org/blog/AUG_19_2012.html)

------
enkiv2
Lots of library maintainers can't be arsed to put parentheses around their
print statements (and perform the occasional slight change to other
behaviors), or to run any of the automated tools that perform these
compatibility-preserving changes. As a result, libraries maintained by these
stubborn lazy people are not usable on python3, which makes beginners (who
don't have a clear understanding of how these libraries are written and how
easy it would be for them to perform the conversions themselves, because they
still believe that "professionals" have some magic power other than the
willingness to be persistent) wary of doing anything in python3.

It's very straightforward to write code that works in python 2 and python 3,
and anyone learning python for the first time should be learning to write in
that way. Ultimately, many of the compatibility changes are making things that
have long been possible but considered poor style / bad habits no longer
possible when doing so made the language easier to understand and behaviors
more predictable (think print statement vs print function), or streamlining
things that were originally bolted-on (think unicode).

~~~
trcollinson
Full disclosure: I do not work in Python. However, I found your explanation
really enlightening and it brings up a further question. If there are tools
that would make these libraries better in some automated fashion, would there
be an opportunity for an open source project to basically go through all of
the libraries and check them for compatibility and then run the automation to
try to upgrade them and submit pull requests for the outcome if it turned the
project from incompatible to compatible?

I live over in the Ruby and JavaScript realm of things. I can imagine running
through every project on Ruby Gems or on NPM and through it would be a
monstrous undertaking it would be useful to the community and to the projects
themselves. Would this be possible on the Python side of things as well?

~~~
enkiv2
A properly written python2 module will already be python3 compatible, in most
cases. Occasionally, modules that violate existing best practices will do so
in ways that limit python3 compatibility. They can be fixed with automated
tools that ship with python.

Package systems like pip have separate repositories for python2 and python3,
and you can have both python2 and python3 installed along with pip3 and pip2,
and a whole package set for each; a package that is not compatible with
python3 won't be available from pip3. But, most packages were already
compatible, and those that weren't have had many years to become compatible.

Any python package that currently doesn't support python3 is either no longer
being maintained or is acting as a political statement.

------
Zelmor
Don't worry about them, loud minority. Zed Shaw's book, (I've read it) does
rub people the wrong way in many communities. Don't worry about it, mostly it
got ad hominem over the years (think Phil Fish). Just focus on your studies
and to hell with the rest.

People arguing about other's technical choices in computing are just children
grown to size L anyway. What do you care what others go their work with? There
Is No One Good Way.

------
proyb2
I even heard a joke: Python 2 = North Korea Python 3 = South Korea

Except Swift 2 to Swift 3 has a good start, breaking as much source
compatibility as they could is a great choice when the language is still
young.

PHP 5.6 adopted UTF8 by default for security and Python 2 is mature and solve
many problems in the past, I would say most programmers are lazy writing test
suite as well.

You should start with Python 3 or Swift 3, both are a fine language for the
modern world.

------
upofadown
Why do people like any language? In the case of Python it wasn't that the
syntax was the best syntax ever and the way it did object oriented programming
was the best. It was that it came with so much pre-existing functionality
("batteries included").

So now there is an improved version called Python 3. OK, now we get into a
discussion of why it is improved. That causes the always divisive discussion
of how people _should_ be programming.

IMHO the biggest problem with Python 3 is the Unicode stuff. The world seems
to be moving toward just using UTF-8 for everything. The approach taken by
Python 3 seems pointlessly complex and inefficient at this point in time.

~~~
giuscri
UTF-8 never bothered me in Python 3. Most of the time you don't have to think
about encoding. The times you have to pass through the network just
".encode()" the string and you're fine.

Seriously, can you show me a case where you did encounter problems with UTF-8
in Python 3? :)

------
kozak
Because developers from cultures whose languages can be fully satisfied with
the Latin-1 charset (which is the absolute majority in the developed world)
don't get how important and essential Unicode is. But things are changing to
better now, thankfully.

~~~
itamarst
Python 2 had full Unicode support.

~~~
tedmiston
Yes, but not without effort the way it is in Python 3. Having to prefix
strings with "u" and include the utf-8 encoding header _sometimes_ are
definitely nuisances in Python 2.

------
max_
The only reason why I still use Python2.7.x instead of 3 is because I
occasionally use old libraries/dependencies that have not yet been ported to
python 3.x

Python 2.7 is about to "Expire" though,
[https://pythonclock.org/](https://pythonclock.org/)

But as a newcomer, it depends on what you are doing, if your tooling is
already python 3.x compatible, then I see no reason to stick with 2.7x

------
tedmiston
> Guido has already said that Python 3 is the future of the language and
> development on Python 2 will come to an end.

 _Eventually_ Python 2 will come to end. He issued this statement in the past
and it didn't happen on the timeline he had hoped. At PyCon this year an
extended life for Python 2 was announced, until 2020 IIRC.

------
codegeek
As few others have said, Python3 still does not have full support for popular
libraries from Python2. Yes, it is getting there but not yet. For example,
according to this site [0], Carbon is not supported by Python3 yet.

[0] [http://py3readiness.org/](http://py3readiness.org/)

