Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.032 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'python': 0.09; 'subject:while': 0.09; 'ignore': 0.13; '(which,': 0.16; 'called,': 0.16; 'complained': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'heap': 0.16; 'stdlib.': 0.16; 'wrote:': 0.17; 'feb': 0.19; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'chris': 0.28; 'complain': 0.29; 'maybe': 0.29; 'johnson': 0.32; 'could': 0.32; 'that!': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'list': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'your': 0.60; 'news': 0.68; '2013': 0.84; 'rick': 0.91; 'imagine': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=SP85IY14CRgpKiAMmGoZ6KYFGu5C5/WU24CJzUVbbdk=; b=f68Nv/NWPCE4vXYKgBPrK2CyNb5pBFeXTTeQCXkaCRIaOjSqcPAb3rxVRisLl1TkAC wX9xDH1/pKZLb8In4lMKZoZ3pCswzEIU9mmbXHZbUOoZ6kDa4dKsGtqFKZ2VxDX8A4qy XJ11NNbTi8ODeyMWEaHLoHfog3PDROvGmWDLgDXoF3l2CcuhN4s7FBYKSF2SGtBGkrWH 3OIK0VVE9o91HQUrH4z51hfZsU3SKuDqkT+nLSFfUvmTb3ss1HcfssoeN0gsUGGAhOW+ xyC+uR3uhacN0yk3xPLPzX9+ebGL9Lra8Ni5Mc4P0slY9817/h8EqGkxLLWp3U4b+ESs 0duw== MIME-Version: 1.0 X-Received: by 10.52.37.109 with SMTP id x13mr12057327vdj.10.1360472682921; Sat, 09 Feb 2013 21:04:42 -0800 (PST) In-Reply-To: <51fdb504-9969-4bff-b1dc-32e231beecd4@googlegroups.com> References: <5002a1f9$0$29995$c3e8da3$5496439d@news.astraweb.com> <7b027612-a07e-40f9-8ad2-3e95c5440482@googlegroups.com> <86872ad2-fda0-403b-9f18-d1cb18e41860@t32g2000yqd.googlegroups.com> <50039290$0$29978$c3e8da3$5496439d@news.astraweb.com> <9309333c-13a0-464c-bd94-9c682363b8c9@googlegroups.com> <511516db$0$29969$c3e8da3$5496439d@news.astraweb.com> <62c3e7bb-d023-43b4-b759-f424707fd346@googlegroups.com> <75c82449-773e-4077-a6c9-e9cef08f845f@googlegroups.com> <51fdb504-9969-4bff-b1dc-32e231beecd4@googlegroups.com> Date: Sun, 10 Feb 2013 16:04:42 +1100 Subject: Re: Implicit conversion to boolean in if and while statements 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.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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360472685 news.xs4all.nl 6891 [2001:888:2000:d::a6]:35061 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38556 On Sun, Feb 10, 2013 at 3:54 PM, Rick Johnson wrote: > Well Chris i have wonderful news for you! Python /does/ have "homogenous arrays", and they're called, wait for it......... arrays! Imagine that! That's not a built-in. But you were the one who complained about the way sum() could be applied to a list that contains a non-integer; maybe your solution is simply to ignore sum() and work with array.array? Nice how you can complain about Python for not having something, then heap scorn on me for not being aware that it's there in the stdlib. (Which, by the way, I freely admit to being less than fully familiar with. Even less familiar with what's on PyPI.) ChrisA