abusing __builtins__
Mike Fletcher
mfletch at tpresence.com
Sun Feb 25 20:47:27 EST 2001
I've used this extensively in one (very large) in-house demo I created, I
used builtins.APPLICATION to refer to a global application object. Was very
simple and useful. Yes, a hack, but I considered it a rather nice hack.
Apparently this is another of those "you're wrong, Mike, just plain wrong"
things :) .
I seem to get more and more of those these days,
Mike
-----Original Message-----
From: Thomas Wouters [mailto:thomas at xs4all.net]
Sent: Sunday, February 25, 2001 6:17 PM
To: python-list at python.org
Subject: Re: abusing __builtins__
On Sun, Feb 25, 2001 at 06:08:35PM -0500, Tim Peters wrote:
> People other than you will be unable to understand your code regardless,
> because GlobalVariable will look to them like an unbound variable (i.e.,
> nobody else uses this trick, so nobody else will recognize the usage
> pattern).
Actually, Mailman used this trick for a while. Not in any release, though,
and Barry removed the ugly hack a week or two ago. Not sure if it was
originally Barry's idea, or just part of the internationalization patch he
accepted.
--
Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
--
http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list