There is still a semantic problem to solve the following

sage: Unknown or False
False
sage: False or Unknown
Unknown

Python is using __nonzero__ to deal with these or/and/not operators.
This method __nonzero__ implicitly defines the conversion to booleans.
And Python sets

x or y := x if bool(x) is True and y otherwise

It might be changed to

x or y :=
    x if trool(x) is True
    y if trool(x) is False
    x if trool(x) is Unknown and trool(y) is not True
    y if trool(x) is Unknown and trool(y) is True

I guess it is what you called "shortcut". In this form it is a max
operation with True -> 1, Unknown -> 1/2, False -> 0.

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