diff -r 422a0175bbf5 Doc/reference/datamodel.rst --- a/Doc/reference/datamodel.rst Fri Oct 19 23:59:35 2012 +1000 +++ b/Doc/reference/datamodel.rst Sat Oct 20 00:56:00 2012 -0400 @@ -1875,7 +1875,10 @@ 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:`__nonzero__` method and whose :meth:`__len__` method returns zero is - considered to be false in a Boolean context. + 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.__getitem__(self, key)