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 rhettinger
Recipients docs@python, rhettinger, steven.daprano
Date 2017-12-23.08:12:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1514016722.23.0.213398074469.issue32413@psf.upfronthosting.co.za>
In-reply-to
Content
FWIW, this isn't a quirk of how locals() works.  Instead, it reflects the more interesting reality that at the top level, locals and globals *are* the same dictionary.   Also, that is not the only occurrence -- if exec() is called with only one dictionary, that dict is used for both locals and globals.
History
Date User Action Args
2017-12-23 08:12:02rhettingersetrecipients: + rhettinger, steven.daprano, docs@python
2017-12-23 08:12:02rhettingersetmessageid: <1514016722.23.0.213398074469.issue32413@psf.upfronthosting.co.za>
2017-12-23 08:12:02rhettingerlinkissue32413 messages
2017-12-23 08:12:02rhettingercreate