[issue37131] all(range()...)) is needlessley slow
Serhiy Storchaka
report at bugs.python.org
Sun Jun 2 07:59:57 EDT 2019
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
You can implement it yourself.
_all = all
def all(obj):
if isinstance(obj, range):
return 0 not in obj
return _all(obj)
I do not see reasons to do this in the stdlib.
----------
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37131>
_______________________________________
More information about the Python-bugs-list
mailing list