[Python-Dev] Python 3 design principles

Neal Norwitz nnorwitz at gmail.com
Wed Aug 31 22:56:37 CEST 2005

On 8/31/05, Oren Tirosh <oren.tirosh at gmail.com> wrote:
> Writing programs that run on both 2.x and 3 may require ugly
> version-dependent tricks like:
> try:
>     compile
> except NameError:
>     from sys import compile

Note we can ease this process a little by making a copy without
removing, e.g., adding compile to sys now without removing it.  As
programs support only Python 2.5+, they could use sys.compile and
wouldn't need to resort to the try/except above.

I realize this is only a marginal improvement.  However, if we don't
start making changes, we will be stuck maintain suboptimal behaviour


More information about the Python-Dev mailing list