Testing if a global is defined in a module

Chris Angelico rosuav at gmail.com
Wed Jul 6 00:45:00 CEST 2011


On Wed, Jul 6, 2011 at 3:36 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> 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



More information about the Python-list mailing list