[issue36720] Correct Should to Must in Definition of object.__len__
Brett Cannon
report at bugs.python.org
Thu Apr 25 13:53:14 EDT 2019
Brett Cannon <brett at python.org> added the comment:
There is probably validation code in len(), but the method itself can do whatever it wants if you call it directly. So the documentation is accurate in saying the method _should_ return >= 0 but that there's nothing strictly enforcing that in Python for that specific method when defined and called directly.
----------
nosy: +brett.cannon
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36720>
_______________________________________
More information about the Python-bugs-list
mailing list