diff options
author | Georg Brandl <georg@python.org> | 2006-07-30 10:53:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-07-30 10:53:32 (GMT) |
commit | ad6911bd6294d6d7e63772c3ede36dfbbd79220b (patch) | |
tree | 2e99df265b11d4800a0a618d0198019ca95a5432 /Doc/ref | |
parent | a7edb111221bfde68fdcc84fe01c6b1d9b28a312 (diff) | |
download | cpython-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.tex | 3 |
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} |