Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.06; 'indicates': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'finney': 0.16; 'inability': 0.16; 'merely': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'feb': 0.22; 'machine': 0.22; 'shell': 0.22; 'header:User- Agent:1': 0.23; "shouldn't": 0.24; '(or': 0.24; 'header:X -Complaints-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; 'unix': 0.29; 'asked': 0.31; 'url:wiki': 0.31; 'though.': 0.31; 'url:wikipedia': 0.31; 'writes:': 0.31; 'sense': 0.34; 'but': 0.35; 'url:org': 0.36; 'ben': 0.38; 'convention': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'commands': 0.60; 'tell': 0.60; '26,': 0.68; 'url:%1': 0.72; '2015': 0.84; 'answer:': 0.84; 'borrow': 0.84; 'received:125': 0.84; 'subject:Practices': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Python Worst Practices Date: Thu, 26 Feb 2015 11:11:24 +1100 References: <85bnkh5z96.fsf@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:IgakgfZ0+LW9uQMeT12BscNGttQ= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424909709 news.xs4all.nl 2872 [2001:888:2000:d::a6]:38669 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86453 Chris Angelico writes: > On Thu, Feb 26, 2015 at 10:48 AM, Ben Finney wrote: > > Chris Angelico writes: > > > >> (Flipping the booleans makes no sense to me. When would 0 mean true > >> and 1 mean false? […]) > > > > The Unix commands ‘true’ and ‘false’ follow that convention > > . > > Yes, but my point is: You shouldn't need to rebind those names (or > have names "true" and "false" for 0 and 1). That's not what you asked, though. You asked “When would 0 mean true and 1 mean false?” My answer: in all Unix shell contexts. > Instead, use "success" and "failure". You'd better borrow the time machine and tell the creators of Unix. The meme is already established for decades now. -- \ “Firmness in decision is often merely a form of stupidity. It | `\ indicates an inability to think the same thing out twice.” | _o__) —Henry L. Mencken | Ben Finney