Solved

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

Posted on 2013-12-03
3
625 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Python - passing two arguments to two different pages using url get method 4 64
Installing Flask app on IIS7 10 341
Perl Frameworks 1 90
linux date/time setting via python 6 60
Less strange, but still introduction This introduction was added (1st August, 2011) to reflect some reactions.  Firstly, the term basics in the title of the article...  As any other word, it is a symbol with meaning attached to the word by some a…
A set of related code is known to be a Module, it helps us to organize our code logically which is much easier for us to understand and use it. Module is an object with arbitrarily named attributes which can be used in binding and referencing. …
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…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

785 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