[Python-Dev] optimizing out local variables
Gregory P. Smith
greg at krypto.org
Mon Feb 25 05:39:53 CET 2008
On 2/24/08, Guido van Rossum <guido at python.org> wrote:
>
> Let's only do it for -O; the optimization may interfere with debugging the
> code.
Does anyone ever actually bother to use -O?
On Sun, Feb 24, 2008 at 6:27 PM, Neal Norwitz <nnorwitz at gmail.com> wrote:
>
> > Short description (see http://bugs.python.org/issue2181 for the patch
> > and more details):
> >
> > Optimize code like:
> > x = any_expression
> > return x
> >
> > to:
> > return any_expression
> >
> > The local variable x is no longer set before returning. Is this
> > appropriate for .pyc generation or should it only be done for .pyo
> > files?
> >
> > n
> > _______________________________________________
> > Python-Dev mailing list
> > Python-Dev at python.org
> > http://mail.python.org/mailman/listinfo/python-dev
>
> > Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/guido%40python.org
> >
>
>
>
>
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/greg%40krypto.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20080224/d9ceb721/attachment.htm
More information about the Python-Dev
mailing list