[Python-checkins] cpython (3.2): #16128: clarify that instances of user-defined classes compare equal with

ezio.melotti python-checkins at python.org
Fri Feb 1 04:20:43 CET 2013


http://hg.python.org/cpython/rev/e84c5cf92b6f
changeset:   81862:e84c5cf92b6f
branch:      3.2
parent:      81856:9c0cd608464e
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Fri Feb 01 05:18:44 2013 +0200
summary:
  #16128: clarify that instances of user-defined classes compare equal with themselves.

files:
  Doc/glossary.rst |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Doc/glossary.rst b/Doc/glossary.rst
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -320,7 +320,8 @@
       All of Python's immutable built-in objects are hashable, while no mutable
       containers (such as lists or dictionaries) are.  Objects which are
       instances of user-defined classes are hashable by default; they all
-      compare unequal, and their hash value is their :func:`id`.
+      compare unequal (except with themselves), and their hash value is their
+      :func:`id`.
 
    IDLE
       An Integrated Development Environment for Python.  IDLE is a basic editor

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list