Solved

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

Posted on 2013-12-03
3
642 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Installing Python 2.7.3 version on Windows operating system For installing Python first we need to download Python's latest version from URL" www.python.org " You can also get information on Python scripting language from the above mentioned we…
Article by: Swadhin
Introduction of Lists in Python: There are six built-in types of sequences. Lists and tuples are the most common one. In this article we will see how to use Lists in python and how we can utilize it while doing our own program. In general we can al…
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…

717 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