[Python-checkins] r50973 - python/trunk/Doc/ref/ref3.tex
georg.brandl
python-checkins at python.org
Sun Jul 30 12:53:32 CEST 2006
Author: georg.brandl
Date: Sun Jul 30 12:53:32 2006
New Revision: 50973
Modified:
python/trunk/Doc/ref/ref3.tex
Log:
Clarify that __op__ methods must return NotImplemented if they don't support the operation.
Modified: python/trunk/Doc/ref/ref3.tex
==============================================================================
--- python/trunk/Doc/ref/ref3.tex (original)
+++ python/trunk/Doc/ref/ref3.tex Sun Jul 30 12:53:32 2006
@@ -1886,6 +1886,9 @@
\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}
More information about the Python-checkins
mailing list