Hacker News new | ask | show | jobs
by travisjungroth 3347 days ago
2 and 3 have like a 90% overlap. How can you call one a flaming garbage heap and the other a nice language?

I worked in Python 2 daily for about a year and a half (doing side stuff in 3), and switched over to Python 3 a few months ago. It's just not that big of a deal. Maybe it's because I'm pretty shielded from the madness of strings vs. bytes (or just import from future).

2 comments

>How can you call one a flaming garbage heap and the other a nice language?

----------

try:

    import queue as queue
except ImportError:

    import Queue as queue
----------

They couldn't even consistently name portions of the standard library. Python 2 has a few random things where the first letter is capitalized while 99% of everything else isn't.

There's all sorts of things like this, where poor design decisions cause you to sit there with question marks appearing over your head. That 10% takes Python from being a joy to work with to being incredibly frustrating. I would be happy if I could just work exclusively in 3, but making sure things are backwards compatible to 2.7 is a frequent source of driving me up the wall.

>Maybe it's because I'm pretty shielded from the madness of strings vs. bytes (or just import from future).

If you lose this shielding it will help you understand my vitriolic response as well.

Yet Python 3 still has logging.getLogger()
> How can you call one a flaming garbage heap and the other a nice language?

The lack of UnicodeDecodeErrors.

Just because there is a 90% overlap doesn't mean one can't be a pile of trash (i think that's a bit harsh though). The improvements under the hood are huge (unicode, no 'new-style' classes, speed improvements etc) as well as syntactic sugar means that as time goes on Python 2 looks worse and worse.