Georg Brandl added the comment:

Your failure appears to be not pasted from an interpreter session; the actual 
failure is:

(Pdb) all(x < limit for x in items)
*** NameError: global name 'limit' is not defined

(i.e. "limit" is not found, not "items").  This actually does not work in 
Python 2 either.  What did work in Python 2 and doesn't work in 3, is using a 
list comprehension like

all([x < limit for x in items])

This is because list comprehensions are now implemented with their own function 
object like generator expressions have always been.  To make the code in pdb 
compile "as if" it was put in the debugged function will be as good as 
impossible, so I'm closing this as won't fix.

----------
resolution:  -> wont fix
status: open -> closed

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

Reply via email to