diff -r f6fcff683866 Doc/reference/datamodel.rst --- a/Doc/reference/datamodel.rst Wed Oct 17 18:08:40 2012 -0400 +++ b/Doc/reference/datamodel.rst Wed Oct 17 20:15:03 2012 -0400 @@ -1799,10 +1799,13 @@ builtin: len single: __bool__() (object method) - Called to implement the built-in function :func:`len`. Should return the length - of the object, an integer ``>=`` 0. Also, an object that doesn't define a - :meth:`__bool__` method and whose :meth:`__len__` method returns zero is - considered to be false in a Boolean context. + Called to implement the built-in function :func:`len`. Should return the + length of the object, an integer ``>=`` 0. Also, an object that doesn't + define a :meth:`__bool__` method and whose :meth:`__len__` method returns + zero is considered to be false in a Boolean context. A dynamic object with + a :meth:`__len__` method should report accurately. If it cannot, it should + raise a :exc:`TypeError`. For more details on :meth:`__len__` see the + docstring in the test file :source:`Lib/test/test_iterlen.py`. .. method:: object.__length_hint__(self)