[issue21161] list comprehensions don't see local variables in pdb in python3

Xavier de Gaye report at bugs.python.org
Sun Apr 13 22:12:38 CEST 2014


Xavier de Gaye added the comment:

The NameError exception occuring on a generator expression referencing a local variable when the generator is called within exec() is the object of multiple entries in the bug tracker, see issue 13557.

msg 149096 in this issue suggests using exec(code, locals()) to fix the problem. It seems that what does currently the do_interact() method, and what is proposed in the patch is the recommended practice to handle this problem.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21161>
_______________________________________


More information about the Python-bugs-list mailing list