Commonly-used names in the Python standard library

Marko Rauhamaa marko at pacujo.net
Thu Feb 20 10:14:32 EST 2014


Chris Angelico <rosuav at gmail.com>:

> If the interpreter were to include every dialect of "old Python", then
> it would have a lot more than two branches. They would, in fact,
> increase exponentially with every Python version.

It shouldn't be *that bad*; the linux kernel is grappling with the glut
of system calls, but they are managing it reasonably well. I don't see
why Python, especially at this mature stage, couldn't adopt a similar
stance *going forward*.

In fact, not every syntax change requires special
backwards-compatibility treatment in the compiler. Constructs that used
to be illegal might become legal (say, try-except-finally). They don't
require any attention. Even new keywords have a very small impact on the
parser; it should be a simple matter of enabling dictionary entries.

> Fortunately, there is an alternative. You can specify the version of
> Python like this:
>
> #!/usr/local/bin/python3.4

Well,

 * you won't be finding old Python versions on newer operating system
   distributions,

 * even <URL: http://www.python.org/downloads/> isn't all that extensive
   and

 * the program may import modules that were written in different Python
   dialects.


Marko



More information about the Python-list mailing list