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

Rostyslav Dzinko report at bugs.python.org
Fri Aug 17 13:17:59 CEST 2012


New submission from Rostyslav Dzinko:

I've encountered that OverflowError which can happen in __len__ method is still undocumented, though one issue on this problem: http://bugs.python.org/issue12159 ended up with "need to be documented" comment.

Link to documentation: http://docs.python.org/reference/datamodel.html#object.__len__

I think it must be clarified that __len__ return value is constrained to upper boundary (Py_ssize_t c type) when you plan to call it via len() built-in function.

----------
assignee: docs at python
components: Documentation
messages: 168439
nosy: Rostyslav.Dzinko, docs at python
priority: normal
severity: normal
status: open
title: Possible OverflowError in __len__ method undocumented (when called via len() function)
versions: Python 2.7

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


More information about the Python-bugs-list mailing list