Jesús Gómez added the comment:


Another use case is the use any lambda, or function definition inside the scope 
of a function, for checking conditions in the REPL.

Suppose two inner functions named condition1 and condition2, and a parameter X 
as a Collection:

(Pdb) any(condition1(x) and condition2(x) for x in X)
*** NameError: name 'condition1' is not defined

nosy: +Jesús Gómez

Python tracker <>
Python-bugs-list mailing list

Reply via email to