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


Groups > comp.lang.python > #77519

Re: I have tried and errored a reasonable amount of times

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 <rosuav@gmail.com>
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 <b2540atcdbtj8hce9mnt4ml4i0nv5qso8u@4ax.com> <mailman.13646.1409424597.18130.python-list@python.org> <lu4s2t$sgd$2@reader1.panix.com> <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 <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.13753.1409796188.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Thu, Sep 4, 2014 at 11:54 AM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> although the
> analogy is terrible for ∨. 1+1 = 2, not 1.

I wouldn't say terrible. Unclear perhaps, but functional. Try this exercise:

false, true = 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

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


Thread

I have tried and errored a reasonable amount of times Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-30 14:27 -0400
  Re: I have tried and errored a reasonable amount of times Tim Chase <python.list@tim.thechases.com> - 2014-08-30 13:48 -0500
    Re: I have tried and errored a reasonable amount of times Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-30 14:50 -0400
      Re: I have tried and errored a reasonable amount of times Ned Batchelder <ned@nedbatchelder.com> - 2014-08-30 16:20 -0400
        Re: I have tried and errored a reasonable amount of times Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-30 16:32 -0400
      Re: I have tried and errored a reasonable amount of times Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-31 18:37 +1000
        Re: I have tried and errored a reasonable amount of times Chris Angelico <rosuav@gmail.com> - 2014-08-31 19:16 +1000
    Re: I have tried and errored a reasonable amount of times Grant Edwards <invalid@invalid.invalid> - 2014-09-02 16:43 +0000
      Re: I have tried and errored a reasonable amount of times Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-02 12:59 -0400
      Re: I have tried and errored a reasonable amount of times Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-03 11:44 +1000
        Re: I have tried and errored a reasonable amount of times Rustom Mody <rustompmody@gmail.com> - 2014-09-02 20:14 -0700
          Re: I have tried and errored a reasonable amount of times Steven D'Aprano <steve@pearwood.info> - 2014-09-03 07:16 +0000
            Re: I have tried and errored a reasonable amount of times Marko Rauhamaa <marko@pacujo.net> - 2014-09-03 10:44 +0300
              Re: I have tried and errored a reasonable amount of times Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-04 11:54 +1000
                Re: I have tried and errored a reasonable amount of times Chris Angelico <rosuav@gmail.com> - 2014-09-04 12:03 +1000
                Re: I have tried and errored a reasonable amount of times Rustom Mody <rustompmody@gmail.com> - 2014-09-03 19:23 -0700
                Re: I have tried and errored a reasonable amount of times Marko Rauhamaa <marko@pacujo.net> - 2014-09-04 08:36 +0300
            Re: I have tried and errored a reasonable amount of times Denis McMahon <denismfmcmahon@gmail.com> - 2014-09-04 11:17 +0000
              Re: I have tried and errored a reasonable amount of times Chris Angelico <rosuav@gmail.com> - 2014-09-04 21:42 +1000
                Re: I have tried and errored a reasonable amount of times Denis McMahon <denismfmcmahon@gmail.com> - 2014-09-05 02:53 +0000
                Re: I have tried and errored a reasonable amount of times Chris Angelico <rosuav@gmail.com> - 2014-09-05 13:02 +1000
                Re: I have tried and errored a reasonable amount of times Grant Edwards <invalid@invalid.invalid> - 2014-09-05 14:54 +0000
                Re: I have tried and errored a reasonable amount of times Marko Rauhamaa <marko@pacujo.net> - 2014-09-05 19:45 +0300
  Re: I have tried and errored a reasonable amount of times Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-30 22:21 +0100
    Re: I have tried and errored a reasonable amount of times Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-30 17:48 -0400
      Re: I have tried and errored a reasonable amount of times Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-30 23:32 +0100
      Re: I have tried and errored a reasonable amount of times Cameron Simpson <cs@zip.com.au> - 2014-08-31 15:30 +1000
      Re: I have tried and errored a reasonable amount of times Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-31 19:05 +1000

csiph-web