[Python-Dev] getting rid of default object.__hash__ (SF 660098)

Barry Warsaw barry at python.org
Mon Dec 22 17:10:07 EST 2003


On Mon, 2003-12-22 at 16:04, Guido van Rossum wrote:

>   >>> object.__hash__()
>   135328576
>   >>> object.__hash__(42)
>   Traceback (most recent call last):
>     File "<stdin>", line 1, in ?
>   TypeError:  expected 0 arguments, got 1
>   >>>

Would it be better if object.__hash__() raised a NotImplementedError?

-Barry





More information about the Python-Dev mailing list