Proposal for .py2, py3, etc. extensions. Was: A way to accommodate laguage changes

Terry Reedy tjreedy at
Tue Jul 24 19:30:33 EDT 2001

> In the interest of proposing a solution everyone can live with, may
> suggest adoption of new module name extensions? A module named

Perhaps .py3 for 3.0, the release that cannot run old code.

> will not be picked up or understood by Python 1.x on any platforms
that I am
> aware of. These would be compiled to either ".pyc", ".py2c", or
> depending on whether one can compile the new semantics into code old
> interpreters can handle, and whether it is now okay to allow more
than 3
> letters in file extensions on all popular platforms and file
systems. But
> hopefully everyone gets the idea.

Windows (at least some versions) limited to 3 chars as far as I know.
However, since compiled files are version-specific implementation
'buffers' (and not part of the language definition) with an internal
version identifier (I'm sure), py3 could still be compiled to .pyc

Terry J. Reedy

More information about the Python-list mailing list