Logic problem: need better logic for desired thruth table.

random832 at fastmail.us random832 at fastmail.us
Thu May 28 23:20:19 EDT 2015


On Thu, May 28, 2015, at 17:50, Skybuck Flying wrote:
> Surpisingly enough I don't think there is a casual/common operator for
> this 
> thruth table.
> 
> AND does not apply.
> OR does not apply.
> XOR does not apply.

All sixteen possible logical operators have formal names. This one is
called "B implies A". It can be implemented, as others have mentioned
with "A or not B".

The possibility of spelling these with the comparison operators, as some
have suggested, is a consequence of Python's implementation where True
== 1 and False == 0. In other languages bool may not be relatable (or at
least not orderable), or False may be == -1.



More information about the Python-list mailing list