On 2016-12-04 08:59, Jori Mäntysalo wrote:
Currently
Posets.PentagonPoset().is_antichain_of_poset([2,3,'junk'])
returns False and
Posets.PentagonPoset().is_antichain_of_poset(['junk',2,3])
raises an error. At https://trac.sagemath.org/ticket/19078 I and Travis
have different opinion about which one is the right answer. So please
give your opinion.
I would vote for both cases to give an error. When some user does
Posets.PentagonPoset().is_antichain_of_poset(['junk',2,3]) it is most
likely to be an error. I don't see much usefulness of a "False" answer
here. I understand the mathematical argument why you want to return
False to a yes/no question, but that argument only works because it
returns a boolean. In general, when the input to some function a priori
makes no sense, an error should be raised.
Jeroen.
--
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.