Path: csiph.com!news.swapon.de!newsreader4.netcologne.de!news.netcologne.de!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!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.056 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'syntax': 0.13; 'blame': 0.16; 'maintainable': 0.16; 'readability.': 0.16; 'workflows.': 0.16; 'wrote:': 0.16; "shouldn't": 0.18; 'language': 0.19; 'programming': 0.22; 'split': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'not.': 0.27; 'comparison': 0.29; 'equally': 0.29; 'node': 0.29; 'operators': 0.29; 'robust': 0.29; 'style.': 0.29; 'certainly': 0.30; 'somebody': 0.30; 'language.': 0.32; 'class': 0.33; 'optimize': 0.33; 'languages': 0.34; 'received:10.0': 0.34; 'best,': 0.35; 'something': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'being': 0.37; 'takes': 0.39; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'your': 0.60; 'charset:windows-1252': 0.62; 'between': 0.65; 'designers': 0.72; 'subject:True': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1442526572; bh=PK41YkZZReZqyRgh7igHdrnktAq1C0rgm/9kl4Rk/e4=; h=Date:From:To:Subject:References:In-Reply-To:From; b=F0ehJbjtJzEjfhxklH3OM1LrkY08Xg9/q7+zJqqM0yVcMBpO0xs19bOQHC2JfjIfw OQjdDmCqP4fsuiYREBXafnABhQxg6zjafHZLizCtg+mwX0mjRrFyn8SKbtwDxBwPj1 /u0/8t9KNisJxcHVwJJPMVK5YpFLu9oKQ9Qa18GA= Date: Thu, 17 Sep 2015 23:49:30 +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> <87vbb8hgkl.fsf@elektro.pacujo.net> In-Reply-To: <87vbb8hgkl.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: 1075 X-purgate-ID: 154282::1442526572-00000883-0849D086/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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442526574 news.xs4all.nl 23738 [2001:888:2000:d::a6]:44181 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 4772 X-Received-Body-CRC: 3863001735 Xref: csiph.com comp.lang.python:96787 On 17.09.2015 23:38, Marko Rauhamaa wrote: > Random832 : > >> It being *easier to implement* to have comparison operators be a >> single class and have chaining apply equally to all of them may be an >> excuse for the language to allow it, but it's certainly not an excuse >> for *actually* using it from a standpoint of good style and >> readability. > In general, I don't like such caveats. Either something is in the > language or it is not. > > You don't have to use all language features (I certainly don't), but if > somebody takes advantage of them, you shouldn't consider it bad style. > So if you don't like > > if prev_node is not node in excluded: > ... > > take your complaints to whoever accepted the syntax in the language. One cannot blame it all to the languages designers. They try hard to optimize the programming workflows. The responsibility is evenly split between the users and the designers to use and to design reasonable, maintainable and robust language features. Best, Sven