Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed1.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.018 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'true,': 0.05; 'false,': 0.09; 'way:': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; "wouldn't": 0.14; 'exercise:': 0.16; 'fine.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'true:': 0.16; '(you': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'sep': 0.31; 'steven': 0.31; 'operations': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'subject:have': 0.80; "'and'": 0.84; "'not'": 0.84; 'subject:times': 0.84; 'terrible': 0.84; 'unclear': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=XZIy3C1d+aQ6EZNq2m9JYBR8qrId/nlrROpc0zM/EPI=; b=s/vCYFZYhR4GjDkEK8NI8RmP7CCleUd8BVnMOL1zT6EKKw+RxIbI8lR25F75qDCohz wYzggn6MC2aXyYQv7T1j35oHXQngpCIleyjJhgDGIcT8qpy6zVIsLaaQYq6q5RVdEwlq k+vjx4Q7wU+SIf9BNAb3rKnPCG+NQnjFJ84M2O42eeSBoynOSsTiaytXP84GqHFs0dlJ ZQ521Xg1O13gX1QatK/6klP4U3X8DQuJHcxq6NNs0p69yMd/Lbo0gZhCyjibfkyvrI/S b8TSU+VbCoV6QNNh3nDb3lCT9LhZttxMEu+opFe+//xbrW88hPqe4VFnN/IW6slWVPbx /0nQ== MIME-Version: 1.0 X-Received: by 10.42.84.9 with SMTP id j9mr1336875icl.60.1409796186355; Wed, 03 Sep 2014 19:03:06 -0700 (PDT) In-Reply-To: <5407c63c$0$29967$c3e8da3$5496439d@news.astraweb.com> References: <5406726f$0$6512$c3e8da3$5496439d@news.astraweb.com> <4af60c7a-f4d6-4aa7-b181-fe768ea6f731@googlegroups.com> <5406c052$0$29876$c3e8da3$5496439d@news.astraweb.com> <87a96hcfml.fsf@elektro.pacujo.net> <5407c63c$0$29967$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 4 Sep 2014 12:03:06 +1000 Subject: Re: I have tried and errored a reasonable amount of times From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409796188 news.xs4all.nl 2883 [2001:888:2000:d::a6]:41404 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77519 On Thu, Sep 4, 2014 at 11:54 AM, Steven D'Aprano wrote: > although the > analogy is terrible for =E2=88=A8. 1+1 =3D 2, not 1. I wouldn't say terrible. Unclear perhaps, but functional. Try this exercise= : false, true =3D 0, 1 # or use an old Python if true + true: print("true OR true is true") As long as you accept that any non-zero value is true, and as long as 'and' and 'or' are the only operations you use (you can add 'not' as long as it's defined the same way: "false if x else true"), addition for or works fine. ChrisA