[issue37646] eval() in a list comprehension
Raymond Hettinger
report at bugs.python.org
Sun Aug 4 16:27:54 EDT 2019
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
After more thought, I think the existing behavior is probably what we want. There may not be a clean way to allow access and updates to non-locals. Even if a way was found, it may tie our hands and preclude other implementation changes down the road. Also, such a feature may be at odds with the current API which allows the execution environment to be retargeted. There is also a risk of introducing new security issues.
I've attached a PR to update the eval() docs to reflect the actual behavior.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37646>
_______________________________________
More information about the Python-bugs-list
mailing list