From: Georg Brandl Date: Sun, 30 Jul 2006 10:53:32 +0000 (+0000) Subject: Clarify that __op__ methods must return NotImplemented if they don't support the... X-Git-Tag: v2.5b3~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad6911bd6294d6d7e63772c3ede36dfbbd79220b;p=thirdparty%2FPython%2Fcpython.git Clarify that __op__ methods must return NotImplemented if they don't support the operation. --- diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex index 154af09de6e3..1fd68cb36e78 100644 --- a/Doc/ref/ref3.tex +++ b/Doc/ref/ref3.tex @@ -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}