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


Groups > comp.lang.python > #91450

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-29 08:09 -0400
References <1432869619.871453.281061217.70B58077@webmail.messagingengine.com> <CAPTjJmpRycvcU_v4W3PQcn3gB2qeReQnTKg3u6beXT-BQrBDwg@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.175.1432901875.5151.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, May 28, 2015, at 23:48, Chris Angelico wrote:
> On Fri, May 29, 2015 at 1:20 PM,  <random832@fastmail.us> wrote:
> > 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.
> 
> True.

Gah. I said "False may be -1", but what I *meant* was that *True* may be
-1: something that has some merit for bitwise logic (-1 is all-bits-1).
This is, for example, used in pre-.NET incarnations of Visual Basic (and
COM's VARIANT_BOOL type inherits from this). VB, incidentally, has its
own spellings for these operators, with the "Imp" and "Eqv" operators.

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


Thread

Re: Logic problem: need better logic for desired thruth table. random832@fastmail.us - 2015-05-29 08:09 -0400

csiph-web