Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'bug': 0.02; 'subject:module': 0.04; 'foord': 0.09; 'python-dev,': 0.09; 'wed,': 0.12; 'am,': 0.13; 'wrote:': 0.15; '"at': 0.16; 'embed': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'latter,': 0.16; 'okay,': 0.16; 'subject:global': 0.16; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; 'header:In-Reply-To:1': 0.22; 'trying': 0.23; '(b)': 0.23; 'documented': 0.23; 'code': 0.24; 'message-id:@mail.gmail.com': 0.28; 'to:addr:python-list': 0.34; 'there': 0.34; 'difference': 0.34; 'quite': 0.34; 'things': 0.34; '(a)': 0.35; 'describing': 0.35; 'source,': 0.35; 'yet,': 0.35; 'greatly': 0.36; 'useful': 0.37; 'unless': 0.37; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'steven': 0.38; 'comments': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.40; "we've": 0.62; 'prove': 0.64; 'quote:': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=NeWgoHqqOJG7aQ/brhJ+RVp63O+6H58hCNUYu3jzTIg=; b=qOpJWNCf5GFPVIP5oK4W9o5wVmDceO5mEGa5aTRlVtpBSX5iqZGVSmQvFFLtUOIS4/ Jmo1nD++cdGKSkskDauhKkv7S3RMRoyTLJPIVcXJQv3789ak/6vRmhoyknfZMWRDzdCI Xa1z4YBpYxyBOP1QRCmkW888ii1xc//Rg/vJw= MIME-Version: 1.0 In-Reply-To: <4e134b99$0$29993$c3e8da3$5496439d@news.astraweb.com> References: <3dc7e7a8-9a90-499a-b544-bb9969d9ab55@t5g2000yqj.googlegroups.com> <4e124916$0$29970$c3e8da3$5496439d@news.astraweb.com> <4e124db1$0$29973$c3e8da3$5496439d@news.astraweb.com> <20110705000131.GN1971@johnsons-web.com> <4e134b99$0$29993$c3e8da3$5496439d@news.astraweb.com> Date: Wed, 6 Jul 2011 08:45:00 +1000 Subject: Re: Testing if a global is defined in a module 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1309905903 news.xs4all.nl 21833 [2001:888:2000:d::a6]:39463 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8870 On Wed, Jul 6, 2011 at 3:36 AM, Steven D'Aprano wrote: > > Because unless you are extremely disciplined, code and the comments > describing them get out of sync. Quote: > > "At Resolver we've found it useful to short-circuit any doubt and just > refer to comments in code as 'lies'. " > --Michael Foord paraphrases Christian Muirhead on python-dev, 2009-03-22 And yet, as I have found out by trying to embed V8 (Google's Javascript engine), those little comments can (a) prove the difference between a bug and a misfeature, and (b) be all the documentation there is. Okay, it's not QUITE the latter, but most things are not documented outside of the source, and I greatly appreciate those little comments! ChrisA