Globals or objects?

James Newton jnewton at fuelindustries.com
Thu Feb 21 09:47:17 EST 2008


Duncan Booth wrote:
> The easiest way in Python to implement a singleton is just to
> use a module: all modules are singletons and there is a
> defined mechanism (import) for accessing them.

Hi Duncan,

I'm intrigued by this idea.

Could you give a bare-bones demonstration of it that the relative newbie
that I am can understand?

Thanks in advance,

James



More information about the Python-list mailing list