Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #91421

Re: Logic problem: need better logic for desired thruth table.

From random832@fastmail.us
Subject Re: Logic problem: need better logic for desired thruth table.
Date 2015-05-28 23:20 -0400
Newsgroups comp.lang.python
Message-ID <mailman.152.1432869623.5151.python-list@python.org> (permalink)

Show all headers | View raw


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.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Logic problem: need better logic for desired thruth table. random832@fastmail.us - 2015-05-28 23:20 -0400
  Re: Logic problem: need better logic for desired thruth table. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-29 05:49 +0200
    Re: Logic problem: need better logic for desired thruth table. Laura Creighton <lac@openend.se> - 2015-05-29 06:44 +0200
    Re: Logic problem: need better logic for desired thruth table. Steven D'Aprano <steve@pearwood.info> - 2015-05-29 16:00 +1000
    Re: Logic problem: need better logic for desired thruth table. random832@fastmail.us - 2015-05-29 08:12 -0400

csiph-web