On 11/27/05, Samuele Pedroni <[EMAIL PROTECTED]> wrote: > well, this still belongs to comp.lang.python. ... > not if you think python-dev is a forum for such discussions > on OO thinking vs other paradigms.
Perhaps my style made it look like a discussion on OO thinking vs other paradigms, but my conclusion is exactly about the issue of this thread - Jim suggested to drop default __hash__ and __eq__ for Python 3K. Guido decided not to, because it's useful to use them for identity-based comparison and lookup. I say that I disagree, because I think that __hash__ and __eq__ should be used for value-based comparison and lookup, and because if the user of the object does explicit identity-based comparison/lookup, it doesn't matter to him whether __hash__ and __eq__ are defined or not. I also suggested, in a way, that it's OK to define a default value-based __eq__ method. Noam _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com