[Python-checkins] r64638 - python/trunk/Doc/reference/expressions.rst

georg.brandl python-checkins at python.org
Tue Jul 1 22:50:02 CEST 2008


Author: georg.brandl
Date: Tue Jul  1 22:50:02 2008
New Revision: 64638

Log:
#1410739: add a footnote about "is" and "unusual" behavior.


Modified:
   python/trunk/Doc/reference/expressions.rst

Modified: python/trunk/Doc/reference/expressions.rst
==============================================================================
--- python/trunk/Doc/reference/expressions.rst	(original)
+++ python/trunk/Doc/reference/expressions.rst	Tue Jul  1 22:50:02 2008
@@ -1113,7 +1113,7 @@
 
 The operators :keyword:`is` and :keyword:`is not` test for object identity: ``x
 is y`` is true if and only if *x* and *y* are the same object.  ``x is not y``
-yields the inverse truth value.
+yields the inverse truth value. [#]_
 
 
 .. _booleans:
@@ -1352,3 +1352,7 @@
    only, but this caused surprises because people expected to be able to test a
    dictionary for emptiness by comparing it to ``{}``.
 
+.. [#] Due to automatic garbage-collection, free lists, and the dynamic nature of 
+   descriptors, you may notice seemingly unusual behaviour in certain uses of
+   the :keyword:`is` operator, like those involving comparisons between instance
+   methods, or constants.  Check their documentation for more info.


More information about the Python-checkins mailing list