[Python-checkins] r69573 - python/trunk/Doc/reference/datamodel.rst

georg.brandl python-checkins at python.org
Fri Feb 13 11:44:17 CET 2009


Author: georg.brandl
Date: Fri Feb 13 11:44:17 2009
New Revision: 69573
Log:
#3734: document complex coercing behavior better.
Modified:
 python/trunk/Doc/reference/datamodel.rst
Modified: python/trunk/Doc/reference/datamodel.rst
==============================================================================
--- python/trunk/Doc/reference/datamodel.rst	(original)
+++ python/trunk/Doc/reference/datamodel.rst	Fri Feb 13 11:44:17 2009
@@ -2252,7 +2252,8 @@
 
 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.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /