summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-13 10:44:17 +0000
committerGeorg Brandl <georg@python.org>2009-02-13 10:44:17 +0000
commit9834dd72bc9d73bc54295af6f36b8d76ad8ba245 (patch)
treefe415f32dad7d751515d4daf756696e3137e48bd
parent8fba5b337ced9f4cf9f56505a031f1aff0e6b938 (diff)
downloadcpython-git-9834dd72bc9d73bc54295af6f36b8d76ad8ba245.tar.gz
#3734: document complex coercing behavior better.
-rw-r--r--Doc/reference/datamodel.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 5b6f1e8243..37640e5073 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -2252,7 +2252,8 @@ will not be supported.
In the current implementation, the built-in numeric types :class:`int`,
:class:`long` and :class:`float` do not use coercion; the type :class:`complex`
- however does use it. The difference can become apparent when subclassing these
+ however does use coercion for binary operators and rich comparisons, despite
+ the above rules. The difference can become apparent when subclassing these
types. Over time, the type :class:`complex` may be fixed to avoid coercion.
All these types implement a :meth:`__coerce__` method, for use by the built-in
:func:`coerce` function.