Syntax problem - cannot solve it by myself

Steven D'Aprano steve-REMOVE-THIS at cybersource.com.au
Wed Jun 9 02:02:22 EDT 2010


On Wed, 09 Jun 2010 02:45:36 +0000, Deadly Dirk wrote:

> On Tue, 08 Jun 2010 18:52:44 -0700, alex23 wrote:
> 
> 
>> Unless you have a clear need for 3rd party libraries that currently
>> don't have 3.x versions, starting with Python 3 isn't a bad idea.
> 
> From what I see, most of the people are still using Python 2.x. 


Yes, that is correct, most people are still on 2.x. However, many people 
are dipping their toe into 3.x by using both, or even exclusively on 3. 
"Most" is not "all".

Remember than many deployed systems only have Python 2.6, 2.5 or even 2.4 
as standard, and until the vendors start shipping 3.x as standard, many 
people will be stuck using 2.x even if they want to upgrade.


> My reason for learning Python is the fact that my CTO decided that the
> new company standard for scripting languages will be Python.

And what version of Python will you be using?


> I've been using
> Perl for 15 years and it was completely adequate but, apparently, Perl
> is no longer in. 

Yes, being pushed out of a 15 year comfort zone is painful. Good luck!


> I am afraid that Python3 is like Perl 6, the one with
> Parrot: everybody is reading articles about it but nobody is using it.

Python 3 is actually shipping. While it is a backwards-incompatible 
change from Python 2, it is an incremental change and not a complete re-
write. Large amounts of Python 2.x code will Just Work in Python 3, and 
even larger amounts can be automatically converted using the 2to3 tool. 
Very little needs to be re-written by hand. Most of the changes in Python 
3 are additions, not subtractions. As the What's New says:

"you’ll find that Python really hasn’t changed all that much – by and 
large, we’re mostly fixing well-known annoyances and warts, and removing 
a lot of old cruft."

http://docs.python.org/release/3.0.1/whatsnew/3.0.html

People tend to fixate on things from 2.x that changes, but 3.x also 
introduces many new features, like annotations, keyword-only arguments, 
nonlocal, dict and set comprehensions, and ordered dicts.


The two biggest roadblocks for Python3.x use are:

* distributions are conservative and are still shipping older versions of 
Python; 

* while some web frameworks do support Python 3.x, some important 3rd 
party libraries still don't (e.g. PIL, numpy).

If you're not using those libraries, or stuck on an old conservative 
server, there's absolutely no reason not to start using Python 3.1.



-- 
Steven



More information about the Python-list mailing list