Hi Nils,

On 2013-02-19, Nils Bruin <nbr...@sfu.ca> wrote:
> __richcmp__ is not a special method for python classes. You need to
> implement __eq__ etc for those. I'd hope (and this example
> corroborates it) that cython decided to use the same semantics for non-
> cdef classes. Your example wouldn't change if you called the method
> __foo__ instead.

Yes, you are right.

But the conclusion is the same: dictionaries use hash and ==, and thus
hash should better be compatible with the __richcmp__ method resp. with
__eq__, while __cmp__ is unrelated.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to