[Python-Dev] For Python 3k, drop default/implicit hash, and comparison

Armin Rigo arigo at tunes.org
Sun Nov 27 21:00:38 CET 2005

Hi Noam,

On Sun, Nov 27, 2005 at 09:04:25PM +0200, Noam Raphael wrote:
> No, I meant real programming examples. My theory is that most
> user-defined classes have a "value", and those that don't are related
> to I/O, in some sort of a broad definition of the term. I may be
> wrong, so I ask for counter-examples.

In the source code base of PyPy, trying to count only what we really
wrote and not external tools, I found 19 classes defining __eq__ on a
total of 1413.  There must be close to zero classes that have anything
to do with I/O in there.  If anything, this proves that the default
comparison for classes is absolutely fine and nothing needs to be fixed
in the Python language.

Please move this discussion outside python-dev.


More information about the Python-Dev mailing list