]> granicus.if.org Git - python/commitdiff
Clarify that __op__ methods must return NotImplemented if they don't support the...
authorGeorg Brandl <georg@python.org>
Sun, 30 Jul 2006 10:53:32 +0000 (10:53 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 30 Jul 2006 10:53:32 +0000 (10:53 +0000)
Doc/ref/ref3.tex

index 154af09de6e3bcee97ae0f3438140270603a2b45..1fd68cb36e78147e8d8ed81d0d70a74575ac65b5 100644 (file)
@@ -1886,6 +1886,9 @@ method should be the equivalent to using \method{__floordiv__()} and
 \method{__pow__()} should be defined to accept an optional third
 argument if the ternary version of the built-in
 \function{pow()}\bifuncindex{pow} function is to be supported.
+
+If one of those methods does not support the operation with the
+supplied arguments, it should return \code{NotImplemented}.
 \end{methoddesc}
 
 \begin{methoddesc}[numeric object]{__div__}{self, other}