Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '-1.': 0.09; 'bool': 0.09; 'logic': 0.09; 'received:internal': 0.09; 'spelling': 0.09; 'thu,': 0.15; '(-1': 0.16; '-1:': 0.16; 'bitwise': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'operators,': 0.16; 'operators.': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'suggested,': 0.16; 'this).': 0.16; 'wrote:': 0.16; 'subject:need': 0.18; '(or': 0.21; 'subject:problem': 0.22; '2015': 0.23; "python's": 0.23; 'header :In-Reply-To:1': 0.24; 'chris': 0.26; 'possibility': 0.27; 'least': 0.27; 'comparison': 0.29; 'consequence': 0.29; 'fri,': 0.31; 'true.': 0.33; 'languages': 0.34; 'to:addr:python-list': 0.35; 'false': 0.35; 'something': 0.35; 'but': 0.36; '(and': 0.36; 'basic': 0.36; 'visual': 0.36; 'received:10': 0.37; 'subject:: ': 0.37; 'received:66': 0.38; 'is,': 0.38; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'where': 0.40; 'some': 0.40; 'from:no real name:2**0': 0.61; 'header:Message-Id:1': 0.62 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=g65C/w7KGEbEz5yZV+srLlGEnHY=; b=iI273h jORwDOO8OObrCIk3ZiWl1L7pGADwwqFIIvaxykVFe1M7ErmjYJA0DbwcOAd7WEfG 04MJak/fYh9GzxXAQtM8ZxRgiE1EwV2lyxTeFc720cs+T/0o2YjEJAf0l28cwCcr Jms/CUMd0uecYEjVVtSaO4t9OqocuE6jykNkk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=g65C/w7KGEbEz5y ZV+srLlGEnHY=; b=OzPM6Ca9Th5/IRQc/rlqGNeODQn5nKuXk7E3ik/q7fBodU4 OT4YCgHrvBmXMub7HqOZ9fiDb6cLMt3/n4GtnO7xGh5SZApuw0wY/VnLcofpTo78 XAG0guVVtsiAXP4fRSpbTcRbvyXKZmrJNflsp85do53w8btsYbACG5Uk0q1I= X-Sasl-Enc: MJEpz8A1LsgRBBVsE7WFdaFv3xyGmTKaLJm3pZ10czGJ 1432901390 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-073992ec Subject: Re: Logic problem: need better logic for desired thruth table. Date: Fri, 29 May 2015 08:09:50 -0400 In-Reply-To: References: <1432869619.871453.281061217.70B58077@webmail.messagingengine.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432901875 news.xs4all.nl 2904 [2001:888:2000:d::a6]:33944 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91450 On Thu, May 28, 2015, at 23:48, Chris Angelico wrote: > On Fri, May 29, 2015 at 1:20 PM, 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.