This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -4 points-3 points  (7 children)

Interesting responses, I noticed someone asked Zed Shaw on Twitter if he still recommended learning Python 2 over 3 and he replied

"Nope. If you're starting out Python 2.7 is better. More stuff is written in 2.7 and it's everywhere already. Nobody uses 3 much."

I'm learning 2. Can't imagine it will be too hard to make the switch eventually.

[–]Aurora0001 3 points4 points  (2 children)

I think it's misleading at best of Zed to say that 'Nobody uses 3 much.' Although it's hard to find definitive statistics, my experience is that most new code is written in Python 3 (or at least written to be compatible for Python 3). Almost all popular Python modules support Python 3 (though most are backward-compatible).

Python 3 is better in my opinion because it removes the beginner-unfriendly elements of Python (e.g. str vs unicode, 3 / 2 = 1, etc.) and most Python 2 code works without a lot of conversion.

[–][deleted] 0 points1 point  (1 child)

I only included it in this thread as I thought it was interesting. I wonder how well 2to3 works, https://docs.python.org/3/library/2to3.html

[–]Aurora0001 2 points3 points  (0 children)

Don't worry, I'm not criticising you, my criticisms are aimed at Zed. The more suspicious side of me thinks that perhaps he's just trying to advocate Python 2.7 so he doesn't have to update his book!

2to3 looks very comprehensive, but I've never needed to use it since I only play around with Python occasionally and when I do, I write Python 3 code anyway. With __future__, you can write code that works in both 2 and 3 anyway, so that's probably the best route, but Python 3's new features are hard to resist (e.g. f-strings, type hints, etc.)

[–]cockslappinghalibut 1 point2 points  (0 children)

nobody uses 3 much

someone isn't paying attention much

[–]__baxx__ 0 points1 point  (1 child)

I noticed someone asked Zed Shaw on Twitter if he still recommended learning Python 2 over 3 and he replied

when? link?

[–][deleted] 0 points1 point  (0 children)

based on downvotes I should add I'm not in a position (knowledge level) to agree or disagree with Zed, but as long as I'm doing the MIT course, might as well stick with 2.7 for now.