[Python-Dev] optimizing out local variables

Christian Heimes lists at cheimes.de
Mon Feb 25 15:48:29 CET 2008


Gregory P. Smith wrote:
> 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?

People may start bothering to use -O when it's giving them a speedup for
real. How does -O affect Python code nowadays? IIRC it set __debug__ to
false and removes asserts from the byte code.

Christian


More information about the Python-Dev mailing list