Path: csiph.com!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '16,': 0.03; 'tool,': 0.07; 'received:internal': 0.09; 'wed,': 0.15; '"="': 0.16; '"is': 0.16; '"is"': 0.16; 'comparisons,': 0.16; 'confusion': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'opposite': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'wrote:': 0.16; "shouldn't": 0.18; 'sep': 0.22; 'header:In-Reply-To:1': 0.24; 'sort': 0.25; 'operators': 0.29; 'pep': 0.29; "i'm": 0.30; 'certainly': 0.30; 'language.': 0.32; 'done': 0.35; 'direction': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'agree': 0.37; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'header :Message-Id:1': 0.61; 'more': 0.63; 'natural': 0.67; '(actually,': 0.84; '12:37,': 0.84; 'clarity.': 0.84; 'enforced': 0.84; 'anywhere,': 0.93; 'convinced': 0.93; 'subject:True': 0.93 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=9gMkyYyZiN70F3YJ0fFDzzgImMY=; b=dOh3aN 6dIDzR2SQcPNIZNsfwQZ5ok7KOso2FrBAL4BKqOmzCMCXmquZe8Y6S3ipdxjCKFJ h56qUn6RUgbn1ZNHBVnnvidKyEgNtpQSJk19wyJvB0jrlf+Ktv0YDxepnwiCneR3 KD0G5oc239V0m3KNSAGqVvCHBd6QOCU/7pv7g= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=9gMkyYyZiN70F3Y J0fFDzzgImMY=; b=cg2jtbQaaJYT2aYrw/aO7lK3kdRDENkNkySYsm84jjDJ3EW CnJdpBnyiySaQfvlGr8QNRWlF2AhQF+fnsQEfjTjwlg0hgS9K4omKCTAPY7mIPDh rRYBXiC3iAXfMTgUg85uvHDLTW7VMvudgvg0szNP03mTRIOnRcFjOBeAJ93U= X-Sasl-Enc: QfcItm2ERiIukoG4QYrX/XfeC86m1o/RbREcpvB4Nlye 1442422672 From: Random832 To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-746d2121 Subject: Re: True == 1 weirdness Date: Wed, 16 Sep 2015 12:57:52 -0400 In-Reply-To: <55F99ADB.5020405@mail.de> References: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> <1442412230.1762717.385286049.20841F36@webmail.messagingengine.com> <87oah2jq4y.fsf@elektro.pacujo.net> <55F99ADB.5020405@mail.de> 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442422675 news.xs4all.nl 23838 [2001:888:2000:d::a6]:35235 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96691 On Wed, Sep 16, 2015, at 12:37, Sven R. Kunze wrote: > I like it for x < y < z. > > But I agree more than this often helps confusion more than it helps > clarity. 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 < There's no other scenario, if the operators have natural meanings, that it would actually be natural to write it that way. (Actually, I'm not entirely convinced any harm would be done by allowing you to put "is"/= anywhere, but there certainly shouldn't be opposite direction comparisons, "is not", !=, or "in".) Certainly I think this should be enforced by any sort of lint tool, even if the other uses are not actually removed from the language. I also think it should be part of PEP 8.