Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.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.041 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'bool': 0.09; 'integers': 0.09; 'sun,': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'certainly.': 0.16; 'str()': 0.16; 'subject:() ': 0.16; 'subject:function': 0.16; "hasn't": 0.19; 'header:In-Reply-To:1': 0.22; 'received:209.85.214.174': 0.23; 'received:mail- iw0-f174.google.com': 0.23; 'subject:code': 0.23; 'compare': 0.26; 'essential': 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'implement': 0.30; '17,': 0.31; 'types.': 0.31; 'it.': 0.31; 'to:addr:python-list': 0.32; 'done': 0.32; 'explicit': 0.35; 'quite': 0.36; 'some': 0.37; 'received:209.85': 0.37; 'apr': 0.38; 'strings': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'no.': 0.38; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'how': 0.39; 'header:Received:5': 0.40; '2011': 0.62; 'advantages': 0.77; 'candide': 0.84; 'decades,': 0.84; 'manages': 0.84; 'killed': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=K5UMXZdlOoMp0Uq0EWpU72amnn1CzGHduilTARb4cmU=; b=i5iSfVGf04i4jwBDo++dDb9j1ZqiV2wCbfJKG4ZMcIdxt/DH5YedX78q+554A55mJt CgYwQatJSp8jUNFEvbD9OlSkJXV+LmZ5hjxd88HzXWaRXAmGd6YPYvloT2ZmzaOfcKl9 fPbg4BqZ4crmTotsWYNs/VOcb3mAP6ExbHMd4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=gRntwkmkSypMuJ3qoD0PGns8V02K/5BJ9HR9QQBGSWXIbv2bnHaeqqbM6gYnc1BG/d uP6YvCf8Ja4fIa2KpZtIhsYStBnUg8f4rI6gjiG8rX8zCxdjV5H27ArEs4PlS0ibarQV wZAutP2N52V641VVish1xTRIHGnVGQIbMVlIM= MIME-Version: 1.0 In-Reply-To: <4daaa6f6$0$20187$426a74cc@news.free.fr> References: <4da9fb0b$0$13696$426a74cc@news.free.fr> <87k4etho6e.fsf@benfinney.id.au> <4daa2b72$0$32037$426a74cc@news.free.fr> <87d3klha85.fsf@benfinney.id.au> <4daaa6f6$0$20187$426a74cc@news.free.fr> Date: Sun, 17 Apr 2011 18:46:22 +1000 Subject: Re: Equivalent code to the bool() built-in function From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 11 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303029985 news.xs4all.nl 41103 [::ffff:82.94.164.166]:35263 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3381 On Sun, Apr 17, 2011 at 6:38 PM, candide wrote: > I also try to consider how essential the bool() type is. > Again compare with int() or str() types. Well, of course you can always implement bool as an int; C has done this for decades, and it hasn't killed it. You can also implement integers as strings - REXX manages quite well, and gets some advantages therefrom. But having an explicit bool type has its benefits too. Essential? No. Useful? Certainly. Chris Angelico