I'm trying to get a more precise notion of "one-liner" and understand better which one-liners should not be in the library. At first I thought it might be:
"a function which is a composition of at most two 'user space' functions" but as Nathann just wrote, this is not correct for P.is_connected() vs. P.hasse_diagram().is_connected(), because the latter does more computation. It seems to me that this is related to having generic vs. more specific implementations. Eg., we can always compute a determinant, but for some fields we can compute it more quickly. In this case, we do not expect that the user knows about these better algorithms, the library simply does what is best. However, this (that the user need not know) implies, that we actually always want the method to be available directly (i.e., is_connected should indeed be a method of posets) even if at the moment there is no better algorithm known. That said, it also appears to me that having P.to_partition() is possibly not strictly necessary (apart from the name being ambiguous). But I cannot pinpoint why. If to_partition were something canonical, then, from a user's perspective, I'd expect it to be available as a coercion, like "Partition(P)", but that's not the case here... Martin -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
