Terji <terj...@yahoo.com> added the comment:

>> If there were special dunders __all__ and __any__ it would be easy to 
>> encapsulate this behaviour inside the range objects themselves, and neither 
>> any() nor all() would need to know anything about range objects.

This sounds very interesting, and more general. It would be useful for e.g. 
numpy arrays, where ``all(arr)`` currently is slower than ``arr.all()``. Don't 
know it there's a reason it wasn't implemented this way originally?

----------

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

Reply via email to