diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst --- a/Doc/library/constants.rst +++ b/Doc/library/constants.rst @@ -40,6 +40,13 @@ A small number of constants live in the built-in namespace. They are: on the operator. If all attempted operations return ``NotImplemented``, the interpreter will raise an appropriate exception. + Note that returning this value only makes sense for binary operations such as + :meth:`__lt__` or :meth:`__add__`. The appropriate way to signal that an + operation is unsupported is to leave the relevant method undefined. If the + method must be defined for some reason, invoking the default behaviour (by + calling the superclass' method with :func:`super`) or raising an exception + (typically :exc:`TypeError`) is the encouraged way to do this. + See :ref:`implementing-the-arithmetic-operations` for more details.