Solved

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

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Here I am using Python IDLE(GUI) to write a simple program and save it, so that we can just execute it in future. Because when we write any program and exit from Python then program that we have written will be lost. So for not losing our program we…
Strings in Python are the set of characters that, once defined, cannot be changed by any other method like replace. Even if we use the replace method it still does not modify the original string that we use, but just copies the string and then modif…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

830 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