× {{alert.msg}} Never ask again
Online Machine Learning Course: Learn Machine Learning 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!
Yuvaraj Beegala
Yuvaraj Beegala
5.0
CTO at SchoolCom
I am a geek by profession . I am passionate about new technologies and love to dig in to it. I strongly believe the relationship among science,...
Hire this Expert
Ray Phan
Ray Phan
5.0
PhD, former university instructor and software engineer with 20 years of software development experience in MATLAB, Python, Java, C, and C++. Image Processing and Machine Learning are part of my all-balanced diet. Students get a 33% discount!
NOTE 1: Please note that if your language doesn't appear in my tags in my headline above, I probably don't know it! NOTE 2: I do not accept...
Hire this Expert

Or Become a Codementor!

Online python training course live
Online Machine Learning Course:
Learn Machine Learning in 4 weeks
comments powered by Disqus
Online Machine Learning Course:
Learn Machine Learning in 4 weeks