summaryrefslogtreecommitdiffstats
path: root/Doc/ref
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-07-30 10:53:32 (GMT)
committerGeorg Brandl <georg@python.org>2006-07-30 10:53:32 (GMT)
commitad6911bd6294d6d7e63772c3ede36dfbbd79220b (patch)
tree2e99df265b11d4800a0a618d0198019ca95a5432 /Doc/ref
parenta7edb111221bfde68fdcc84fe01c6b1d9b28a312 (diff)
downloadcpython-ad6911bd6294d6d7e63772c3ede36dfbbd79220b.zip
cpython-ad6911bd6294d6d7e63772c3ede36dfbbd79220b.tar.gz
cpython-ad6911bd6294d6d7e63772c3ede36dfbbd79220b.tar.bz2
Clarify that __op__ methods must return NotImplemented if they don't support the operation.
Diffstat (limited to 'Doc/ref')
-rw-r--r--Doc/ref/ref3.tex3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex
index 154af09..1fd68cb 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}