New submission from Diaa Jad:

This code fails in the python debugger:
(Pdb) z = True
(Pdb) p [x for x in [1,2] if z]
*** NameError: name 'z' is not defined

While the same code works in the interactive shell:
>>> [x for x in [1,2] if z]
[1, 2]

----------

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

Reply via email to