An error is perhaps the most appropriate but not very user friendly.
None is better but a bit disappointing
sage: my_equation.has_solution() # haha answer is None
sage:
And moreover has the same "boolean" behavior as Unknown
sage: None or False
False
sage: False or None
sage: not None
False
Unknown is not broken. It just does not behave like a tripartite
alternative when used with 'not', 'or' and 'and'.
On 01/12/15 18:41, Volker Braun wrote:
Its quite terrible, in Python you can either raise an exception or maybe
return None if you can't decide on a boolean return value. The only
redeeming quality of Unknown is that it documents that it doesn't work,
horray. IMHO we should deprecate it.
On Wednesday, November 25, 2015 at 5:56:02 AM UTC+1, kcrisman wrote:
On social media:
sage: False or Unknown
Unknown
sage: Unknown or False
False
sage: False and Unknown
False
sage: Unknown and False
Unknown
It does seems somewhat inconsistent...
--
You received this message because you are subscribed to the Google Groups
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.