which is best for a singleton, module or class?

Hung Jung Lu hungjunglu at yahoo.com
Sat Dec 1 19:07:13 EST 2001


Kragen Sitaker <kragen at pobox.com> wrote in message news:<83elmftfbt.fsf at panacea.canonical.org>...
> hungjunglu at yahoo.com (Hung Jung Lu) writes:
> > You can simply put your object into the __builtins__ namespace:
> Please don't do that, except as a joke.  Programs have bugs enough
> without obnoxious people deliberately making them harder to
> understand.

Joke? :) It's not a joke. Zope Corporation (the same *obnoxious*
people that hired Guido, ha!) uses it. Experienced Python programmers
do use this device, sparingly, but they do use it, in real life.

Hung Jung



More information about the Python-list mailing list