Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.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.103 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.81; '*S*': 0.02; 'operator': 0.03; 'none,': 0.05; 'none"': 0.09; 'confusion': 0.16; 'disallow': 0.16; 'reasonable.': 0.16; 'wrote:': 0.16; 'have:': 0.18; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'see,': 0.27; 'node': 0.29; 'received:10.0': 0.34; "isn't": 0.35; 'but': 0.36; '(and': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'agree': 0.37; 'no,': 0.38; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'charset:windows-1252': 0.62; 'more': 0.63; 'great': 0.63; "they're": 0.66; 'clarity.': 0.84; 'common,': 0.84; 'mate': 0.84; 'seriously,': 0.91; 'subject:True': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1442421470; bh=HA7lyQHM/fs4i3kN4NcKWlc+gaR3wM1ppuBM/NSpmFw=; h=Date:From:To:Subject:References:In-Reply-To:From; b=u4yisJbbZ3tjKoGbXRztQEObE3r9PaU7lex7v6f5jTCt3v903WSWN39bOMpPGDAg5 maAgiGHHVFmQ8X+r+W47IWevcYflufVaH9MxDcBVlehT/N4mRMwmstZRryjUb6zkU+ +4sUZqmA+nbIA/OtOgIz0TgagUYYSXrZQDADnNRQ= Date: Wed, 16 Sep 2015 18:37:47 +0200 From: "Sven R. Kunze" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: True == 1 weirdness References: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> <1442412230.1762717.385286049.20841F36@webmail.messagingengine.com> <87oah2jq4y.fsf@elektro.pacujo.net> In-Reply-To: <87oah2jq4y.fsf@elektro.pacujo.net> 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: 739 X-purgate-ID: 154282::1442421469-00000778-2F6BCA3B/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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442421480 news.xs4all.nl 23735 [2001:888:2000:d::a6]:55735 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96689 On 16.09.2015 18:16, Marko Rauhamaa wrote: > Chris Angelico : > >> Far as I can see, the only operator that you might want to disallow >> chaining on is 'in' (and its mate 'not in', of course). It isn't >> common, but "x is y is z is None" is a perfectly reasonable way to >> ascertain whether or not they're all None, just as "x = y = z = None" >> is a perfectly reasonable way to set them all to None; > Then you can have: > > first_node is not node is not last_node > > No, seriously, that's not reasonable. > > Frankly, I don't think chaining was all that great of an idea. I like it for x < y < z. But I agree more than this often helps confusion more than it helps clarity. > > Marko