Python 3 __cmp__ semantic change?

Arnaud Delobelle arnodel at googlemail.com
Sun Nov 23 14:04:19 EST 2008


Terry Reedy <tjreedy at udel.edu> writes:

> George Sakkis wrote:
>> On Nov 23, 6:14 am, Arnaud Delobelle <arno... at googlemail.com> wrote:
>>
>>> So how did I get it into my head that defining __eq__ would create the
>>> correct behaviour for __ne__ automatically?  And more puzzlingly, how
>>> come it is what actually happens?  Which should I believe: the
>>> documentation or the implementation?
>>
>> According to Guido, the implementation:
>> http://mail.python.org/pipermail/python-ideas/2008-October/002235.html.
>
> http://bugs.python.org/issue4395
>
> ps to Arnaud: upgrade to rc3, which has bug fixes and many doc changes.

This occured to me after I posted the example so I did update before
building the docs.  When I saw the inconsistency between the docs and
python, I also rebuilt python but it behaved the same.

I didn't try checking bugs.python.org because I can't access python.org
at the moment (thanks Aahz for pointing out it's hosted in the
Netherlands - as there are a number of US hosted sites that I can't
access I just assumed Python was one of them).  I guess the bug report
is about updating the docs!

-- 
Arnaud



More information about the Python-list mailing list