Is it intended that closures created in exec statement/function cannot see locals if the exec was provided a locals dictionary? This code gives an error ("foo" is not found during lambda execution): exec("def foo(x): return x\n\n(lambda x:foo(x))(0)", globals(), {}) while executes normally with exec("def foo(x): return x\n\n(lambda x:foo(x))(0)") Is this the expected behavior? If so where is it documented? Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150812/1f9ab8ac/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4