On 15 November 2016 at 09:12, Bruno Grenet <bruno.gre...@gmail.com> wrote:
> Le 15/11/2016 à 08:53, Vincent Delecroix a écrit :
>>
>> Not currently (though we have "Unknown"). The main problem is the
>> interaction with Python booleans and the operators "or", "and", "not"
>> (which are *not* logical operators). The Sage "Unknown" is badly
>> broken for these reasons
>>
>> sage: not Unknown   # waiting for Unknown
>> True
>> sage: Unknown or False   # waiting for Unknown
>> False
>>
>> So be careful if you start using it!
>>
>> If we would use the correct logical operators ~ (for negation), ^ (for
>> xor) and & (for and) then we might be able to come up with something.
>> But Sage sort of ignore them.
>
>
> What do you mean by this? From what I understand, ~, &, ^ are bitwise
> operators, while "and", "or", "not" are bit operators. In which sense are
> they not logical opeators?

For example they are not commutative

sage: 0 and False
0
sage: False and 0
False

sage: 1 or 3
1
sage: 3 or 1
3

Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to