From ad6911bd6294d6d7e63772c3ede36dfbbd79220b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 30 Jul 2006 10:53:32 +0000 Subject: [PATCH] Clarify that __op__ methods must return NotImplemented if they don't support the operation. --- Doc/ref/ref3.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex index 154af09de6..1fd68cb36e 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} -- 2.50.1