[docs] [issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

Terry J. Reedy report at bugs.python.org
Fri Aug 17 22:18:45 CEST 2012


Terry J. Reedy added the comment:

In #12159, Victor correctly labelled this an implementation (IE, CPython) detail (limitation). I don't believe any implementation has to limit the range of len(). So the question is whether we should add a CPython implementation limit note, including the possibility of OverflowError, and if so, to both len() and __len__() entries. I am not sure of the current doc policy.

The second sentence of the len entry is out of date. " The argument may be a sequence (string, tuple or list) or a mapping (dictionary)." Sets and any collections with a size (__len__ method) can also be arguments. I am not sure how to revise that either.

----------
nosy: +benjamin.peterson, georg.brandl, haypo, terry.reedy
stage:  -> needs patch
versions: +Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15718>
_______________________________________


More information about the docs mailing list