This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michal Kononenko
Recipients Michal Kononenko, docs@python
Date 2019-04-25.14:52:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556203938.29.0.467406560077.issue36720@roundup.psfhosted.org>
In-reply-to
Content
The link below defines __len__

https://docs.python.org/3/reference/datamodel.html?highlight=__len__#object.__len__

However, I was reading in the StackOverflow thread below that CPython does some validation to check that the return value of __len__ should be >= 0. Does this mean that len must return a value >= 0, in the RFC 2119 sense of the word?

https://stackoverflow.com/questions/42521449/how-does-python-ensure-the-return-value-of-len-is-an-integer-when-len-is-cal
History
Date User Action Args
2019-04-25 14:52:18Michal Kononenkosetrecipients: + Michal Kononenko, docs@python
2019-04-25 14:52:18Michal Kononenkosetmessageid: <1556203938.29.0.467406560077.issue36720@roundup.psfhosted.org>
2019-04-25 14:52:18Michal Kononenkolinkissue36720 messages
2019-04-25 14:52:18Michal Kononenkocreate