Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:

>From https://docs.python.org/3/library/functions.html#exec :

"modifications to the default locals dictionary should not be attempted. Pass 
an explicit locals dictionary if you need to see effects of the code on locals 
after function exec() returns."

There was also some discussion about potentially clarifying the locals() 
semantics in this PEP: https://www.python.org/dev/peps/pep-0558/

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45707>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to