Re: [sage-support] False versus Unknown

2015-12-01 Thread kcrisman
> > > > This is inconsistent (and documented ;-). But is it documented someplace easy for Sage users to find? Thanks! > For the operations "or" and > "and" Python actually uses "__nonzero__". *Not* "__or__" and "__and__" > which are the bitwise operation "|" and "&". > > They work as

Re: [sage-support] False versus Unknown

2015-12-01 Thread Vincent Delecroix
On 01/12/15 15:01, kcrisman wrote: This is inconsistent (and documented ;-). But is it documented someplace easy for Sage users to find? Thanks! I would say "no". It is in the `__init__` method of the `UnknownClass`. It should be moved to the main documentation class. For the

Re: [sage-support] False versus Unknown

2015-12-01 Thread Emmanuel Charpentier
Le mercredi 25 novembre 2015 12:28:45 UTC+1, vdelecroix a écrit : > > Hello, > [ Snip... ] The only way to fix Unknown would be to patch (non trivially) Python. > Boolean inherits from int... and it would be hard to have a third party > "Unknown" coherent with this inheritance. There was a

Re: [sage-support] False versus Unknown

2015-12-01 Thread Vincent Delecroix
On 01/12/15 15:18, Emmanuel Charpentier wrote: Le mercredi 25 novembre 2015 12:28:45 UTC+1, vdelecroix a écrit : Hello, [ Snip... ] The only way to fix Unknown would be to patch (non trivially) Python. Boolean inherits from int... and it would be hard to have a third party "Unknown"

Re: [sage-support] False versus Unknown

2015-11-25 Thread Vincent Delecroix
Hello, This is inconsistent (and documented ;-). For the operations "or" and "and" Python actually uses "__nonzero__". *Not* "__or__" and "__and__" which are the bitwise operation "|" and "&". They work as follows: In "x and y" if "x.__nonzero__()" is False then the result is "x" otherwise

[sage-support] False versus Unknown

2015-11-24 Thread kcrisman
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