A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-February/077192.html below:

[Python-Dev] optimizing out local variables

[Python-Dev] optimizing out local variables [Python-Dev] optimizing out local variablesBrett Cannon brett at python.org
Mon Feb 25 03:53:51 CET 2008
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?

I don't see how this is any more aggressive than what the peepholer
already does, so I see no issue with it being used in .pyc files.

-Brett
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4