Ethan Furman added the comment:

How about:

    Special value which should be returned by the binary special methods
    (e.g. :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:`__rsub__`,
    etc.) to indicate that the operation is not implemented with respect to
    the other type; may be returned by the in-place binary special methods
    (e.g. :meth:`__imul__`, :meth:`__iand__`, etc.) for the same purpose.
    Its truth value is true.

    Note::
    When NotImplemented is returned, the interpreter will then try the
    reflected operation on the other type, or some other fallback, depending
    on the operator.  If all attempted operations return NotImplemented, the
    interpreter will raise an appropriate exception.


I have no idea how to create a link to the 'Implementing the arithmetic 
operations' section.  Any clues?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22780>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to