Path: csiph.com!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'anyway.': 0.04; 'python.': 0.11; '"="': 0.16; '"is"': 0.16; 'restricting': 0.16; 'wrote:': 0.16; 'exists': 0.18; 'header:In-Reply-To:1': 0.24; 'all.': 0.24; 'feature': 0.24; "i've": 0.25; 'header:User-Agent:1': 0.26; 'fine': 0.28; 'operators': 0.29; 'certainly': 0.30; 'know.': 0.34; 'languages': 0.34; 'received:10.0': 0.34; 'so,': 0.35; 'best,': 0.35; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'charset:windows-1252': 0.62; 'production': 0.67; 'subject:True': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1442424237; bh=fr6NqCE60b9PXAqr644fJ0YpNNAjbGU6nTc+vJ45SEo=; h=Subject:To:References:From:Date:In-Reply-To:From; b=JENr9wxFQfBclgSzJ0CXCZiLUr5u/p1QdJUMNx6y/X3N2ta/pMElvmrTKfq3/pUL3 RVWkP+282XSyMyVL7WEsAVFsmD/yUEe5IMdkcLBDiXN5AJSfvilGFcHvdBxgJUoGLM rGhifGd+GJqpVRsldIpHLnKPrxR053n1B+MsnbsM= Subject: Re: True == 1 weirdness To: python-list@python.org References: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> <1442412230.1762717.385286049.20841F36@webmail.messagingengine.com> <87oah2jq4y.fsf@elektro.pacujo.net> <55F99ADB.5020405@mail.de> <1442422672.1804523.385461961.6F1DFD96@webmail.messagingengine.com> From: "Sven R. Kunze" Date: Wed, 16 Sep 2015 19:23:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1442422672.1804523.385461961.6F1DFD96@webmail.messagingengine.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 593 X-purgate-ID: 154282::1442424237-00000778-67542E80/0/0 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442424240 news.xs4all.nl 23720 [2001:888:2000:d::a6]:49103 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96693 On 16.09.2015 18:57, Random832 wrote: > I think that chaining should be limited to: > > A) all operators are "=" > B) all operators are "is" > C) all operators are either >= or > > D) all operators are either <= or < That certainly would be a fine guideline. Only use it with all operators the same. Everything else might cause headaches. Restricting it language-wise? I don't know. I have to admit I've never seen this in production anyway. Most languages I see people working with don't have this feature at all. So, they don't know it exists in Python. Best, Sven