[ python-Bugs-1179957 ] Missing def'n of equality for set elements

SourceForge.net noreply at sourceforge.net
Sun Apr 10 00:10:48 CEST 2005


Bugs item #1179957, was opened at 2005-04-09 17:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1179957&group_id=5470

Category: Documentation
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Nobody/Anonymous (nobody)
Summary: Missing def'n of equality for set elements

Initial Comment:
The documentation of the sets module doesn't describe the
properties of set elements that they must have to properly
work in sets (at least I didn't see it described).  In creating a
set of instances, I had to sort of stumble around and
discover that the class needed to define both __eq__ and
__hash__.  Either alone didn't seem to work.  Perhaps I've
got it all wrong and there's a better way to do things.  It would
be nice if the docs described things officially though.




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1179957&group_id=5470


More information about the Python-bugs-list mailing list