Hi,

On 2013-02-26, Simon King <simon.k...@uni-jena.de> wrote:
>> That's perfect: I don't want this coercion :-)
>
> No?
> ...
> So, you *really* don't want a coercion between parents that have
> previously evaluated equal? I.e., in a case where the only difference is
> the prefix? Then I just change the test above.

And perhaps I also add a ".. TODO::" somewhere in the docs.

Namely, if I am not mistaken, comparison on elements should not be
implemented by providing __eq__, __ne__ and __cmp__, explicitly invoking
the coercion model. Instead, for a *Python* class, one should just define
__cmp__ as always, where one can assume that both inputs have identical
parents (so, no explicit invocation of the coercion model is needed). 

Would you agree to leave it is a "todo" to follow the comments on __cmp__
and __richcmp__ from sage.structure.element, and for now just fix the
tests?

Best regards,
Simon

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


Reply via email to