Solved

Python 2.7 vs 3.3 - what's actually in use??

Posted on 2013-12-03
3
621 Views
Last Modified: 2013-12-04
If you were to work in a network operation at a tech company - what version of Python is most in play as we near the start of 2014?  I am working through a python tutorial where the presenter just insists on our using 2.7.  But if the world is moving on I'd rather familiarize with the more current version.  Thoughts? Opinions??
0
Comment
Question by:amigan_99
3 Comments
 
LVL 28

Accepted Solution

by:
pepr earned 250 total points
ID: 39695524
Both are used. I suggest to learn both. They are not that different. String vs. bytes is one of the most visible differences, in my opinion. When working with texts, you should be more precise when to use a text mode or binary mode for files, what encoding is used, etc. Anyway, this was important also for 2.7 -- programmers were just lazy and ignored some consequences (use u'unicode strings' and the codecs module in 2.7 to get ready).

If you learn 2.7 well, you will find no problem with 3.3. Some things are actually cleaner and simpler, more regular -- like using iterators wherever possible.

I recommend the "Dive into Python 3" by Mark Pilgrim, Chapter 4. Strings as a starter, and then Porting Code to Python 3 with 2to3 to scan through differences between Python 2 and Python 3.

(Your presenter is right. 2.7 is the best for the majority. Anyway, 3.3 is worth to learn for future.)
0
 
LVL 27

Assisted Solution

by:d-glitch
d-glitch earned 250 total points
ID: 39695573
If you are bold, go through the tutorial with 3.3 on your own time.  It should be easy after doing it in 2.7, and you will see the differences and issues between versions for yourself.

For a small personal project, the best choice is usually to use the latest software.

On a large legacy system, there are usually good reasons not to upgrade.

On a large new system, you would like to go with the latest rev but you have to make sure that all the aux libraries you need have been upgraded as well.  

PyClips (for example) is stuck at 2.7.  And the last time I checked, the MatLab libraries were still in beta.
0
 
LVL 1

Author Closing Comment

by:amigan_99
ID: 39695719
Thank you very much.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

"The time has come," the Walrus said, "To talk of many things: Of sets--and lists--and dictionaries-- Of variable kinks-- And why you see it changing not-- And why so strange are strings." This part describes how variables and references (see …
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now