.. function:: length_hint(obj, default=0)
Return an estimated length for the object *o*. First trying to return its
- actual length, then an estimate using ``__length_hint__``, and finally
- returning the default value.
+ actual length, then an estimate using :meth:`object.__length_hint__`, and
+ finally returning the default value.
.. versionadded:: 3.4
.. method:: object.__length_hint__(self)
- Called to implement ``operator.length_hint``. Should return an estimated
+ Called to implement :func:`operator.length_hint`. Should return an estimated
length for the object (which may be greater or less than the actual length).
The length must be an integer ``>=`` 0. This method is purely an
optimization and is never required for correctness.