× {{alert.msg}} Never ask again
Online Python Course: Learn Python in 4 Weeks
View Class

Python 2.7 vs Python 3.4 ─ What should Python Beginners choose?

– {{showDate(postTime)}}
Martijn Pieters, Stack Overflow Python Legend

Codementor Python expert and Stack Overflow legend Martijn Pieters joined us for an Office Hour session, in which he provided some informative opinions about several issues asked by our viewers.

As Martijn’s used Python 3.4 in his demo, one of the questions asked was whether if there is a good reason for Python beginners to move from 2.7 to 3.4

The text below is a summary done by the Codementor team and may vary from the original video and if you see any issues, please let us know!


 

Python 2.7 vs Python 3.4 ── What’s the difference and what should Python Beginners choose?

“This really depends on what third-party libraries you rely on.”

Personally, until Python 3.3 or 3.4, I would have stuck with Python 2.7, but I am now using Python 3.4 because of all the neat new features, and I think those changes will also make life easier for beginners. For example, the object-oriented path library and enumeration addition should be very helpful, and it’s not that difficult to switch over to Python 3. I think the Python developers have nailed the 3.x line, as it performs really well, and the interpreter uses history better than previous releases. Personally I really like the auto-completion features, which is why I used Python 3.4 in my demos. Moreover, Python 3.3. and 3.4 are getting all the developers’ attention, which means all the cool new additions are gathered in those versions, and they will be moving the ecosystem forward with the 3.x line. I believe 2.7 will be the last version for the 2.x series.

However, in Python 2.x a beginner won’t have to worry about all the implicit encoding and decoding issues that may arise when mixing byte strings and Unicode strings, so that may be something to consider.

The greatest difference between Python 2 and 3 is the libraries you use. If you are doing web development and use a lot of libraries that only support Python 2.x and have not yet been ported to Python 3.x, you might not have the same experience that makes Python so great.

In conclusion, beginners should have no problem switching over to Python 3, but if you are a beginner who depends on a lot of libraries that are 2.x only, then maybe it’s not such a great idea.


Other posts in this series with Martijn Pieters:

Martijn Pieters

Need Martijn’s help? Book a 1-on-1 session!

or join us as an expert mentor!



Author
Martijn Pieters
Martijn Pieters
5.0
I'm no longer available for mentoring, sorry!
Hire the Author

Questions about this tutorial?  Get Live 1:1 help from Python experts!
Sagar Chand Agarwal
Sagar Chand Agarwal
5.0
Python Programmer. KDE Developer.
Python is what makes me with sprinkles of QML as a part of KDE Developer. The new fuss is with Go with Javascript.
Hire this Expert
Bryan
Bryan
5.0
Freelance developer with expertise in PHP / Laravel, JS / jQuery and Java.
Hi, I am Bryan, a small business software developer from NYC! Mentoring: I like to tailor my mentoring to the particular client. If you are a...
Hire this Expert

Or Become a Codementor!

Online python training course live
Online Python Course:
Learn Python in 4 Weeks
comments powered by Disqus
Online Python Course:
Learn Python in 4 Weeks