This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, xiang.zhang
Date 2016-04-22.09:01:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461315715.38.0.256230430357.issue26825@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 2, using the exec statement makes the compiler disable fast locals: 

    >>> def foo(): pass
    ... 
    >>> def bar(): exec ''
    ... 
    >>> foo.__code__.co_flags & inspect.CO_OPTIMIZED
    1
    >>> bar.__code__.co_flags & inspect.CO_OPTIMIZED
    0

This has never been the case in Python 3, in which exec() is a function instead of a statement. The exec function can be shadowed by a global named "exec", so the hack to disable fast locals was removed.
History
Date User Action Args
2016-04-22 09:01:55eryksunsetrecipients: + eryksun, xiang.zhang
2016-04-22 09:01:55eryksunsetmessageid: <1461315715.38.0.256230430357.issue26825@psf.upfronthosting.co.za>
2016-04-22 09:01:55eryksunlinkissue26825 messages
2016-04-22 09:01:55eryksuncreate