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.