[Python-Dev] email package status in 3.X

Steven D'Aprano steve at pearwood.info
Sun Jun 20 04:04:30 CEST 2010


On Sat, 19 Jun 2010 11:55:29 pm Stephen J. Turnbull wrote:

> If you want to do Python 3 a favor,
> make sure that they understand that Python 3 is *not* an "upgrade" of
> Python 2.
[...]
> Python 3 is a Python-2-like language, but even though it's built on
> the same design principles, and uses nearly identical syntax, there
> are fundamental differences.  And it is *very* young.  So it's a new
> language and should be approached in the same way as any new
> language.

I haven't written any large projects in Python3, so take this with a 
grain of salt, but I just don't see that Python3 is a "new language" as 
most people understand the term. It might be splitting hairs, but I see 
it as a new dialect *at worst*, and probably not even that, in the 
sense that any half decent human coder who can read Python 2.x code 
should be able to make sense of Python 3.x code, and vice versa.

As I see it, the changes to the language and syntax between 2.x and 3.x 
are much smaller than those between 1.x to 2.x:

Python 2.x introduced a brand new object model (new style classes). 
Python 3.x does not.

Python 2.x introduced radically new syntax, namely list comprehensions, 
while 3.x merely extends the same idea to set and dict comprehensions.

Python 2.x introduced lexical scoping AND closures. Python 3.x does 
nothing as radical.

Python 2.x introduced a new (to Python) programming model, namely 
iterators, complete with TWO extensions to syntax (generator functions 
including yield, generator expressions), *and* then went and made yield 
a function so as to introduce coroutines as well. Python 3.x merely 
uses iterators in more places.

Python 2.x introduced Unicode strings. Python 3.x merely makes them the 
default.

The only major difference is that Python 3 takes away as well as adding, 
but even there, Python 2 did the same, e.g. there is no provision to 
get the old scoping behaviour except to go back and use 2.1 or older.

Frankly, I believe that pushing the meme that "Python 3 is different" is 
a strategic mistake. People hate and fear change. I should know this. I 
resisted Python 2.x and stuck with 1.5 until Python 2.3 was released, 
and then was amazed at how *easy* the transition was. Of course, I 
wasn't using third party libraries that hadn't been ported to 2.3, if I 
had my experience would have been different. It's bad enough to have to 
tell people "Python 3 is currently lacking some critical libraries, 
particularly third-party libraries" without also telling them (wrongly 
IMO) "oh, and it's a new language too".



-- 
Steven D'Aprano


More information about the Python-Dev mailing list