On 7/27/06, Steven Bethard <[EMAIL PROTECTED]> wrote: > If I understand the problem right, the reason for not wanting to > remove __hash__ from object is that it's often convenient to have a > dict or set where objects are compared by id() instead of by value.
No, not at all. This is for objects whose __eq__ is also the default (which happens to compare by id). Such objects aren't considered to have a "value" in the sense that a list or dict or int has a value, because whatever attributes they have aren't considered for comparison. Each instance of such classes is a unique value. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
