Path: csiph.com!goblin3!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '16,': 0.03; 'true,': 0.04; '(1,': 0.09; 'received:internal': 0.09; 'sane': 0.09; 'language,': 0.11; 'wed,': 0.15; '"in"': 0.16; '(3,': 0.16; '2),': 0.16; 'chained': 0.16; 'container,': 0.16; 'mean,': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'really?': 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; 'rhs': 0.16; 'sense,': 0.16; 'wrote:': 0.16; 'language': 0.19; 'sep': 0.22; 'suppose': 0.22; 'header:In-Reply-To:1': 0.24; 'testing': 0.25; 'chris': 0.26; 'container': 0.29; 'equality': 0.29; 'raise': 0.29; 'probably': 0.31; "can't": 0.32; 'useful': 0.33; 'but': 0.36; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'really': 0.37; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'ever': 0.60; 'care': 0.60; 'header :Message-Id:1': 0.61; 'great': 0.63; "they're": 0.66; 'technically': 0.91; 'subject:True': 0.93; 'imagine': 0.96 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=ndbVyxcxVcOSKrQf7Kz/zIHtMhA=; b=veVNqx SvOeGPtQKZWg/I7Y0JaNzszJ850K1o5Qx1UvnP/0xlYQ/YHCveHBilNxc9Ek0E66 DMsGLcl2+8Dk5OQanIaSuFJjXUfLoBTlBp9AbGuNzJRLvf3vmaxvaZX+pRdKfafG oPJ1ocGLw/XdAB9cWWZxmF4ti8VVPKpxKxm3E= 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=ndbVyxcxVcOSKrQ f7Kz/zIHtMhA=; b=hW1c7ojMLWOk9A/dJMu9oBAkwX63qTpsCvwoZ+FV5iA0R1b nYHvuWNszKReWb4h9F5e2jgGY2qjDFF4otaRK4G2mNCoKoSQBCAF4SWO75H4Lye0 Et602dtNOnWunSaHj7qXatjxCcohh44M/z1mmEu9XOtA30Rb9jkc05PN7AmQ= X-Sasl-Enc: cWbMBJvToP+14lYzU4oQ9WzxKdTMuDdg8rmDV+PsScyw 1442412230 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 10:03:50 -0400 In-Reply-To: References: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442412232 news.xs4all.nl 23720 [2001:888:2000:d::a6]:54651 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96680 On Wed, Sep 16, 2015, at 09:05, Chris Angelico wrote: > My view is that they should remain in the language, but that > dissimilar comparisons should raise linter warnings. I can't imagine a > sane reason for chaining 'in' and equality like that (since the RHS of > 'in' will be a container, and if you're testing the whole container > for equality, you probably don't care about one member in it), but for > language consistency, it's good to support it. > > Chained comparisons of the same type are a great feature: Do chained "in" comparisons ever really make sense, even when they're all the same type? I mean, I suppose 1 in (1, 2) in ((1, 2), (3, 4)) is technically true, but how useful is it really?