Modules are Singletons! (was Re: Catalog of Python Patterns? [LONG!])

Andy Gimblett gimbo at ftech.net
Fri Apr 5 10:34:58 EST 2002


On Fri, Apr 05, 2002 at 09:47:10AM -0500, Aahz wrote:
> In article <mailman.1017996733.25069.python-list at python.org>,
> Andy Gimblett  <gimbo at ftech.net> wrote:
> >
> >Really?  I've used Singleton a fair bit (probably too much in fact)
> >for stuff like configuration information.  I'm curious as to how else
> >I could/should do this.
> 
> Use a module.  Don't use a class unless you need a class.

/me closes his eyes tight, opens his mouth, thinks about it for a
while, shaking his head around slightly, feels something click, says
"wow", opens his eyes, says "wow" again, and hits reply.

Wow.  Man, I love python.

Cheers for the epiphany

-Andy

-- 
Andy Gimblett - Programmer - Frontier Internet Services Limited
Tel: 029 20 820 044 Fax: 029 20 820 035 http://www.frontier.net.uk/
Statements made are at all times subject to Frontier's Terms and
Conditions of Business, which are available upon request.





More information about the Python-list mailing list