Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!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.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'interpreter': 0.04; 'pop': 0.05; 'python': 0.09; 'oh,': 0.09; 'snippet': 0.09; 'subject:while': 0.09; 'typed': 0.09; 'suggest': 0.11; 'sat,': 0.15; '"python': 0.16; 'corrects': 0.16; 'exists?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mean,': 0.16; 'sorts': 0.16; 'wrote:': 0.17; 'feb': 0.19; 'module': 0.19; 'bit': 0.21; 'statement': 0.23; 'this:': 0.23; 'header:In-Reply-To:1': 0.25; 'creating': 0.26; 'fit': 0.26; 'am,': 0.27; 'question': 0.27; 'see,': 0.27; 'message- id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'lines': 0.28; 'run': 0.28; 'oop': 0.29; 'statements': 0.29; 'types.': 0.29; "i'm": 0.29; 'function': 0.30; 'stuff': 0.30; 'expect': 0.31; 'sense': 0.31; 'code': 0.31; 'johnson': 0.32; 'function.': 0.33; 'like:': 0.33; 'to:addr:python-list': 0.33; 'knowledge': 0.33; 'received:google.com': 0.34; 'sequence': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'next': 0.35; 'but': 0.36; '12,': 0.36; "wasn't": 0.36; 'method': 0.36; 'too': 0.36; 'does': 0.37; 'being': 0.37; 'why': 0.37; 'quite': 0.37; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'little': 0.39; 'help': 0.40; 'your': 0.60; 'you.': 0.61; 'time,': 0.62; 'ever': 0.63; 'it!': 0.64; 'making': 0.64; 'decided': 0.65; 'useful.': 0.65; 'sum': 0.66; 'special': 0.73; '"mr.': 0.84; '/only/': 0.84; '2013': 0.84; 'ask,': 0.84; 'finger,': 0.84; 'maybe,': 0.84; 'upset': 0.84; 'on?': 0.91; 'rick': 0.91 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:content-transfer-encoding; bh=sVfDeqq0Zm5pzy/ddQfgZ3BKU/nu3XXfLr/EKTB5iUc=; b=M6ehOa21aCln4cxzd1npSo52PDnnTnBAmLy6aa7HT4bnPcASgSlzC+1r7RgrdFso8E Ti1LvMRzI3uQU1wrSxw3tO/hbJbel6nu+MXA5s9xfVaXrL2MVtjt0QIx8ez+xQKDJar6 wlR1f8PBxp2e7VFuvokeWMLMCQG+H8zFemV40J9mv2KDn9GK1TYE7AVhMxgp2rKliyi3 79+/1HQovGHk/jyPy5kYCeJ8D+xQBGawpNCYDHi1DRCJJKNwDp+hifGmuyuk/6AjrBIj GpKUEYWZCTyEYDRfDbZkykFdcJmlbOoT20PZF1ZHDafYKLW6FoZ/S0c1rU1CG3J866Un WbzA== MIME-Version: 1.0 X-Received: by 10.220.219.77 with SMTP id ht13mr18607863vcb.66.1360590744473; Mon, 11 Feb 2013 05:52:24 -0800 (PST) In-Reply-To: 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> <04856796-18ef-42e9-b7e9-66354475a78f@googlegroups.com> Date: Tue, 12 Feb 2013 00:52:24 +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 Content-Transfer-Encoding: quoted-printable 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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360590746 news.xs4all.nl 6854 [2001:888:2000:d::a6]:60368 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38683 On Tue, Feb 12, 2013 at 12:28 AM, Rick Johnson wrote: > I am sure there are quite a few Chris. But if you expect to around making= statements like: "Python does not have typed arrays", then don't get all u= pset when someone corrects you. Oh, I don't mind being corrected on those sorts of points. And if ever I say "Python doesn't have a module for creating a DNS server", I will be quite happy to be corrected, because DNS servers are fun. But my statement wasn't based on my own knowledge of the stdlib, but rather on this: On Sat, Feb 9, 2013 at 6:58 AM, Rick Johnson wrote: > I'm a bit unnerved by the sum function. Summing a sequence only makes sen= se if the sequence in question contains /only/ numeric types. For that reas= on i decided to create a special type for holding Numerics. Why create a special type if it already exists? > Maybe, before you go and pop your mouth off next time, if it isn't too mu= ch trouble, i mean, i don't want you to get a cramp in your wrist or a blis= ter on your finger, much less a headache reading a few lines of documentati= on, but if is not too much to ask, "Mr. Angelico", i would suggest you stuf= f this tiny little code snippet into your favorite Python interpreter and r= un it! > > py> help('modules') > > See, some python functions are useful. Yep. By the way, how does the help function fit into your wonderfully OOP model? What's it a method on? ChrisA