Re: [sage-support] Re: False versus Unknown

2015-12-02 Thread Jeroen Demeyer
On 2015-12-02 00:23, Volker Braun wrote: IMHO undecidability has exception semantics so really there is only one correct solution, namely raise. Otherwise you get sage: foo() == bar() # haha both Unknown True But we can override __eq__ (or __richcmp__), so it could be sage: foo() == bar()

Re: [sage-support] Re: False versus Unknown

2015-12-01 Thread Volker Braun
IMHO undecidability has exception semantics so really there is only one correct solution, namely raise. Otherwise you get sage: foo() == bar() # haha both Unknown True On Tuesday, December 1, 2015 at 11:20:53 PM UTC+1, vdelecroix wrote: > > Unknown is not broken. It just does not behave like

Re: [sage-support] Re: False versus Unknown

2015-12-01 Thread Vincent Delecroix
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

[sage-support] Re: False versus Unknown

2015-12-01 Thread Volker Braun
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