[Python-Dev] [Python-checkins] cpython: Describe the default hash correctly, and mark a couple of CPython

Nick Coghlan ncoghlan at gmail.com
Mon May 21 04:50:11 CEST 2012


It's true for the default comparison definition for user defined classes,
which is what that paragraph describes.

--
Sent from my phone, thus the relative brevity :)
On May 21, 2012 2:32 AM, "Terry Reedy" <tjreedy at udel.edu> wrote:

> On 5/20/2012 4:31 AM, nick.coghlan wrote:
>
>  +   and ``x.__hash__()`` returns an appropriate value such that ``x == y``
>> +   implies both that ``x is y`` and ``hash(x) == hash(y)``.
>>
>
> I don't understand what you were trying to say with
> x == y implies x is y
> but I know you know that that is not true ;=0.
>
> ______________________________**_________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/**mailman/listinfo/python-dev<http://mail.python.org/mailman/listinfo/python-dev>
> Unsubscribe: http://mail.python.org/**mailman/options/python-dev/**
> ncoghlan%40gmail.com<http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120521/37b7fa7e/attachment-0001.html>


More information about the Python-Dev mailing list