Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.112 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.78; '*S*': 0.01; 'interpreter.': 0.07; 'get.': 0.09; 'logic': 0.09; 'terms,': 0.09; 'python': 0.11; 'article:': 0.16; 'nick': 0.16; 'silly': 0.16; 'all.': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'trying': 0.19; '>>>': 0.22; 'interpret': 0.24; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'evaluation': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:wiki': 0.31; 'python"': 0.31; 'url:wikipedia': 0.31; 'basic': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'done': 0.36; 'thanks': 0.36; 'similar': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'resource': 0.38; 'to:addr:python.org': 0.39; 'read': 0.60; 'simple,': 0.60; 'back': 0.62; 'times': 0.62; "you've": 0.63; 'here': 0.66; 'results': 0.69; 'study': 0.69; 'carefully': 0.74; 'repeat': 0.74; 'circuit': 0.84; 'experiment': 0.84; 'fails,': 0.84; 'subject:gets': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type; bh=b48PWZLAaBzsZ/r3+tURESW+1Ldp7xtKzAzKCOcKzdE=; b=PZzaPvtLGBV1zeLqs/Fo245b3Tk3GuqbPBKIvaSXxHtC9GcfSn/jOuTBGIfXfq2YjT IOYQ13LRjrjFOg7wkHveoawcS/fXAgh447Rz7J2GRAkqnAMaE8T4t0WBCfdNEOPcPL0M zfGC1ob++grkGGe6GW+1k1DSWHi9g6MRDGE0KeqGt49IchLeRIos3jqXOXTXcYz14tb3 yY8zDMPmaQRjK5BDWN7RiTf0W59ecfk/IwPS219kJI+BuFyKeZgz/mD4SLAJ577TMYgd avJhJO+nX27WPvC0k9CUWTtbhhKfP/oocW/qIzlkhquT5x/JHNeKa6VgSw+uypJXz+5R 9Jpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=b48PWZLAaBzsZ/r3+tURESW+1Ldp7xtKzAzKCOcKzdE=; b=G0wZWBqcPci2jLGsfraZc859XH1WKREmjkF7AT9RVxIdSkVVmOYOl/NG384ln1QSp5 8nlLOZZTqscA/h73tQYeRNvPuMCY1w38XR1LIbtMDuTyNVnlzDj4U9gwV0pitDcNosQ1 bCrG7w2JzICKwHIdrqfR8kTbNVRehNAHaOTIO7bVETqB9nldTxWz5/FrB2QAUlmApr/M hXhP9RZ5zqoFumhaa5JPB76p0z0gJBZFuOs60o8rhOZWzA2GB2tVOqYJcknMbAR5IjRb UyYoU1EjGuLAdcpvJP2L/7T2UjsTglj+hXoVlkhINqJ8o9EJDbbSNzHeWIz+rAnVpkZg yzjA== X-Received: by 10.180.81.8 with SMTP id v8mr1389697wix.15.1371217710689; Fri, 14 Jun 2013 06:48:30 -0700 (PDT) MIME-Version: 1.0 Sender: z@etiol.net X-Originating-IP: [190.47.101.237] In-Reply-To: References: <2bc90d3b-09c2-4315-9357-ff7f039465e0@googlegroups.com> <51b926a3$0$29997$c3e8da3$5496439d@news.astraweb.com> <51ba6e92$0$29997$c3e8da3$5496439d@news.astraweb.com> From: Zero Piraeus Date: Fri, 14 Jun 2013 09:48:09 -0400 X-Google-Sender-Auth: Dy0Xwu4M99zBXU49_Lna5HNWg6c Subject: Re: A certainl part of an if() structure never gets executed. To: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQn6aHPJC/GuJka/4ECClHIZrO/Fl0wpCZCq7KzJdQvZ2vTMqbHTOKtnvNJYVrYS1MfMB4fX 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: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371217712 news.xs4all.nl 15892 [2001:888:2000:d::a6]:49112 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48146 : On 14 June 2013 09:07, Nick the Gr33k wrote: > > Thanks for explaining this but i cannot follow its logic at all. > My mind is stuck trying to interpret it as an English sentence: > > if ('Parker' and 'May' and '2001') > > if ('Parker' or 'May' or '2001') > > i just don't get it and i feel silly about it. You've been advised many times to experiment in the Python interpreter. I may be mistaken, but I don't recall seeing any evidence at all that you've ever done so. Try the following in a Python interpreter: >>> "vic" and "bob" >>> "bob" and "vic" >>> "vic" or "bob" >>> "bob" or "vic" >>> "vic" and "" >>> "" and "bob" >>> "bob" or "" >>> "" or "vic" Carefully study the results you get. This is simple, basic stuff; don't come back here asking for explanations of it. If you get stuck, *carefully* read this article: http://en.wikipedia.org/wiki/Short-circuit_evaluation Repeat the steps above until you do understand. If all else fails, google "short circuit logic" or "short circuit evaluation python" or similar search terms, until you find a resource which you do follow. -[]z.