Which Version of Python?

Andrew Berg bahamutzero8825 at gmail.com
Tue Sep 11 21:07:46 EDT 2012


On 2012.09.11 19:17, Peter wrote:
> If your desire is to "learn" Python then I would stick to 2.7
> 
> My reasoning would be that there are still a significant number of packages that have not been ported to 3.x (and may never be ported).
This is true, but the /potential/ for the need for one of these packages
is not a good reason to learn from a branch that will never get any new
features. If there is indeed a compelling reason to stay with the older
version, then it is a worthwhile tradeoff. Otherwise, it is just silly.

> Not having looked at the changes in 3.x (so don't flame me! :-))
That would be a good reason /to/ flame you. ;)

> , it would seem that anything you "learn" in 2.7 would be easily transferred "up" when and if you feel the need to go to 3.x,
3.x is not a simple superset of 2.7 - there are certain limitations and
ways of doing things in 2.x that don't apply to 3.x. A new programmer
should learn, for example, handling Unicode properly (which is strongly
encouraged in 3.x) and then learn how to deal with less-than-ideal
implementations (like 2.x) rather than learn how to do it sloppily and
then be frustrated when 3.x wants them to do it correctly. Backward
compatibility was not broken for trivial reasons.

> i.e. learning (and using) features of 3.x could make it difficult to go "down"
The official documentation does point out things that have been
added/changed both overall in the "What's New" page and specifically in
each module's documentation.

> when/if you decide you really need to use a library that hasn't (and may never!) be ported to 3.x.
I don't think it's a good idea to encourage people (especially newbies)
to stick with packages that won't get updated. I'm not saying that a
package that isn't planned to be 3.x compatible will necessarily be
unmaintained, but being unmaintained is the reason many packages will
not be made 3.x compatible. In any case, packages that aren't getting
support for 3.x will likely be replaced with better alternatives,
especially once people start flocking en masse to 3.x (I'm no expert,
but my guess is that this will happen once Django and Twisted support 3.x).

If 3.0 had come out a month ago, I would see value in learning 2.x, but
it's been nearly 4 years.
-- 
CPython 3.3.0b1 | Windows NT 6.1.7601.17803



More information about the Python-list mailing list