Python 3000 in 60 seconds

After studying the relevant PEPs and other documents, I've come to the following conclusions:

  • Python 3000 used to be the mythical, revolutionary new release, implemented from scratch (possibly in C++), that would solve all of Python's problems, and then some.
  • However, over time, features that were originally intended for Python 3000 were added to the 2.x branch instead. (Actually, many of these were more like cleanups than new features. Fixing the class/type dichotomy, nested scopes, unifying longs and ints, division operator, etc.)
  • So, in 2008, Python 3000 is not quite so revolutionary anymore, compared to 2.5. As PEP 3000 says, "Python 3000 will be implemented in C, and the implementation will be derived as an evolution of the Python 2 code base. [...] Since Python 3000 as a language is a relatively mild improvement on Python 2, we can gain a lot by not attempting to reimplement the language from scratch."
  • In spite of that, Python 3000 is still special, because it introduces a number of changes that will break backward compatibility. Again, many of these deal with the fixing of warts and inconsistencies. For example: print will become a function; as and with will be keywords, and so will True, False and None; some functions (like map) now return iterators rather than lists; exception handling is different; etc. More here. (I will probably write about some of these changes in more detail later.)
  • Don't count on changes that will change the face of Python completely: explicit self and limited lambda are here to stay, not to mention indentation-based syntax and case sensitivity. (See PEP 3099.)

3 Comments »

  1. PJ said,

    May 16, 2008 @ 4:52 pm

    As far as I'm concerned, the stdlib reorg alone is worth it.

  2. Michael Campbell said,

    May 17, 2008 @ 10:07 am

    I'm an /old/ programmer (20+ years experience, have used professionally Ruby, Perl, Java, C, and C++) coming into Python as a newbie. Is there traction to be gained by learning Python 2.5, or should I wait?

  3. Hans Nowak said,

    May 17, 2008 @ 5:51 pm

    I don't think Python 3.0 will be all that different from 2.5 (or 2.6 which is coming out this year as well)... so starting with 2.5 will likely not be a waste of time, as most features will still be in 3.0.

    That said, you could just wait it out if you are so inclined, but I'm not sure how soon certain libraries will be available for 3.0 (like wxPython for example, or anything else that is non-trivial to port).

RSS feed for comments on this post · TrackBack URI

Leave a Comment