On Thu, Nov 08, 2012 at 10:04:17AM -0800, Travis Scrimshaw wrote: > For doing the ordering option, how do we want to compare two elements > with different ordering on parents? In particular if we do ordering using > the left argument, we'd have (this is not yet in the queue): > sage: P = Partitions(order="lex")([3, 3]) > sage: Q = Partitions(order="dominance")([4, 1, 1]) > sage: P < Q > True # if compared with lex > sage: Q > P > False # if compared with dominance > Should we just return False in both cases or default back to lex > ordering? The easiest option seems to be is leave it as is, where > everything using comparison operators is lex and to check dominance, you > call P.dominate(Q) with large amounts of documentation and warnings about > this. Thoughts?
If it was just for me, I would forbid to compare with '<' two objects with different parents (possibly with some well chosen exceptions like 1/2 < 1). In other words: if you get into a situation where you have a serious doubt about the semantic (and thus probably even more so for the caller), I vote for just raising an exception. That's the safest. Thoughts anyone else? Cheers, Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.