diff options
author | Georg Brandl <georg@python.org> | 2008-07-01 20:50:02 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-07-01 20:50:02 (GMT) |
commit | 3214a01d2789d59d7933ac38c683b18296d73b66 (patch) | |
tree | dbf08e44525f77d1dafc7e5a0852631fb1bb4e36 /Doc | |
parent | 1e0eefc4a1e47278c44c3dab63835a1f2c2421f1 (diff) | |
download | cpython-3214a01d2789d59d7933ac38c683b18296d73b66.zip cpython-3214a01d2789d59d7933ac38c683b18296d73b66.tar.gz cpython-3214a01d2789d59d7933ac38c683b18296d73b66.tar.bz2 |
#1410739: add a footnote about "is" and "unusual" behavior.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/reference/expressions.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index e393661..c815c0e 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -1113,7 +1113,7 @@ The operator :keyword:`not in` is defined to have the inverse true value of 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 @@ groups from right to left). 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. |