Brett Cannon <br...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue36720>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to