On Wednesday, April 1, 2015 at 11:34:19 AM UTC-7, [email protected] wrote: > > On Wed, 1 Apr 2015, Nils Bruin wrote: > > > Sage simply doesn't bother to see if a symbolic (in)equality has a > > constant truth value until pushed to do so. And when you do push it, it > > will mostly return False for Cannot determine, which isn't ideal but is > > forced by python's "excluded third" logic. > > That was new to me. Why Sage can not raise exception? >
Yes, it could and perhaps it does sometimes. This would quickly extend to "==" and "!=" as well, though, and most code expects "A==B" to return without an exception, so there raising an exception is problematic. Python used to expect "<" to be virtually universal as well. Luckily they backed away from that in Python3, but traces remain in sage. The behaviour I originally alluded to is this: sage: bool(x<0) False sage: bool(x>=0) False which is perhaps a little more friendly than raising an exception (the question being answered is: does this happen for all x? We also have nonsense like this, which is a little more problematic. sage: bool(i<0) False sage: bool(i>0) True -- 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.
