Raymond Hettinger <raymond.hettin...@gmail.com> added the comment: 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.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32413> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com