[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)
Terry J. Reedy
report at bugs.python.org
Sat Apr 22 12:09:17 EDT 2017
Terry J. Reedy added the comment:
Has or will builtin classes be modified to follow advice to include a separate __bool__? In 3.6.1,
>>> r = range(19**100)
>>> bool(r)
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
bool(r)
OverflowError: Python int too large to convert to C ssize_t
----------
nosy: +serhiy.storchaka
versions: +Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15718>
_______________________________________
More information about the Python-bugs-list
mailing list