python NotImplemented constant
<p>Looking thru decimal.py and it uses NotImplemented at many special methods e.g.</p>

<pre><code>class A(object):
    def __lt__(self, a):
        return NotImplemented

    def __add__(self, a):
        return NotImplemented
</code></pre>

<p><a href="http://docs.python.org/library/constants.html">Python docs says</a></p>

<blockquote>
  <p>NotImplemented:
      Special value which can be returned by the “rich comparison”
  special methods (<strong>eq</strong>(), <strong>lt</strong>(),
  and friends), to indicate that the
  comparison is not implemented with
  respect to the other type.</p>
</blockquote>

<p>It doesn't talk about other special methods and neither describes the behavior</p>

<p>It seems to be a magic object which if returned from other special methods raises TypeError, and in “rich comparison” special methods does nothing</p>

<p>e.g.</p>

<pre><code>print A() &lt; A()
</code></pre>

<p>prints True, but</p>

<pre><code>print A() + 1
</code></pre>

<p>raises TypeError, so I am curious whats going on and what is the usage/behavior of <strong>NotImplemented</strong></p>
