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 <>
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
    >>> bar.__code__.co_flags & inspect.CO_OPTIMIZED

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.
Date User Action Args
2016-04-22 09:01:55eryksunsetrecipients: + eryksun, xiang.zhang
2016-04-22 09:01:55eryksunsetmessageid: <>
2016-04-22 09:01:55eryksunlinkissue26825 messages
2016-04-22 09:01:55eryksuncreate