Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Antoon Pardon Newsgroups: comp.lang.python Subject: Re: Operator Precedence/Boolean Logic Date: Thu, 23 Jun 2016 10:17:55 +0200 Lines: 24 Message-ID: References: <15997174-44d5-431c-8f90-a8d700921820@googlegroups.com> <56ecacd4-cc17-48ec-9830-57c8113d16f6@googlegroups.com> <3a840cef-24d2-4abb-8e5b-dc80bf48944d@googlegroups.com> <63fe7ea9-a14f-94a2-cdd5-27aa902fbf6b@online.de> <576b8a41$0$2792$c3e8da3$76491128@news.astraweb.com> <576B9B33.2030903@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de 3oPIlktpILjB21wMaZTlIwEnzR3uEvzXPyU6IHsmoyJQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.074 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'received:134': 0.05; 'indeed,': 0.09; 'none.': 0.09; '2016': 0.16; 'andreas': 0.16; 'received:ac.be': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'zero,': 0.16; 'wrote:': 0.16; 'tests': 0.18; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'subject:/': 0.30; 'branch': 0.30; 'received:be': 0.30; 'steven': 0.33; 'list': 0.34; 'could': 0.35; 'direction': 0.35; 'instance': 0.35; 'mine': 0.35; 'nothing.': 0.35; 'should': 0.36; 'project': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'expect': 0.37; 'available.': 0.37; 'one,': 0.37; 'means': 0.39; 'why': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'more': 0.63; 'different': 0.63; 'information': 0.63; 'other.': 0.64; 'thursday': 0.66; "d'aprano:": 0.84; 'schreef': 0.84; 'streams': 0.84; 'hassle': 0.91 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYMAHYeUleGuA9G/2dsb2JhbABehFsBvRCGEgKCAAEBAQEBAWZoDgGDdgEBBCMPAUURCxgCAgUWCwICCQMCAQIBRRMIAogrsU2NPoNbAQslgQGFJoRNhQyCNYJZAQSYRYFXjE2JM4Vpj1JUg3CFEYVtAQEB User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 In-Reply-To: <576b8a41$0$2792$c3e8da3$76491128@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <576B9B33.2030903@rece.vub.ac.be> X-Mailman-Original-References: <15997174-44d5-431c-8f90-a8d700921820@googlegroups.com> <56ecacd4-cc17-48ec-9830-57c8113d16f6@googlegroups.com> <3a840cef-24d2-4abb-8e5b-dc80bf48944d@googlegroups.com> <63fe7ea9-a14f-94a2-cdd5-27aa902fbf6b@online.de> <576b8a41$0$2792$c3e8da3$76491128@news.astraweb.com> Xref: csiph.com comp.lang.python:110380 Op 23-06-16 om 09:05 schreef Steven D'Aprano: > On Thursday 23 June 2016 16:34, Andreas Röhler wrote: > >> Indeed, why should the result of 4 - 4 have a different truth-value than >> 4 - 3 ? > Because 4-4 is zero, which is "nothing", while 4-3 is one, which is > "something". No zero is not nothing. If zere is nothing and an empty list is nothing, I would expect zero to be an empty list or that they could be used interchangebly. For instance in a project of mine polling for information and receiving an empty list is different from receiving None. An empty list means there is currently no information available. None means The information streams came to an end. I rarely need tests where any truthy value will branch in one direction and any falsy value in the other. So IMO it is more hassle than it is worth. -- Antoon.