Steven D'Aprano added the comment:

Not a bug. You have used a generator expression, so it is exhausted once 
you have run over it once using list(). Then, you run over it again with 
any() and all(), but they don't see any values so return the default 
value.

Change the generator expression to a list comprehension [ ... ] and you 
will get the results you want.

----------
nosy: +steven.daprano

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

Reply via email to