Nitish <nitis...@protonmail.com> added the comment:

This can be traced back to the following issue:

>>> c = compile("(lambda: re.findall('a', 'aaa'))()", "<stdin>", "single")
>>> import re as rea
>>> exec(c, None, {'re': rea})
NameError: name 're' is not defined.

Seeing disassembly of the compiled code, it used LOAD_GLOBAL to get re. This 
seems to be the problem.

----------

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

Reply via email to