On 8/31/05, Oren Tirosh <[EMAIL PROTECTED]> 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
forever.

n
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to