Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

I am not sure that this optimization should be added. sum(pred(x) for x in 
data) will be always slower than sum(1 for x in data if pred(x)) because more 
items is passed to sun() in the former case. It can be considered as an 
anti-pattern.

----------

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

Reply via email to