Namespace confusion

Remco Gerlich scarblac at pino.selwerd.nl
Sat May 12 15:18:52 EDT 2001


Daniel Klein <danielk at aracnet.com> wrote in comp.lang.python:
> On 11 May 2001 14:12:40 GMT, scarblac at pino.selwerd.nl (Remco Gerlich) wrote:
> 
> >Depending on what you'd need it for, there are some other methods, like
> >keeping track of the amount of instances in some variable that the __init__
> >can increase, or keeping a list of instances (or one with weak refs), or if
> >you need a singleton, some other method, there are several.
> 
> Where can I find information on implementing singletons in Python? I might have
> a need for this too.

There's been some discussion before, see the thread at
http://groups.google.com/groups?ic=1&th=d4b12d3a5a5bf6b9,7
for answers to that question.

However, there has been discussion on the point that singletons don't make
that much sense in Python. The following thread is very interesting:
http://groups.google.com/groups?ic=1&th=e61b533755e27c16,10

-- 
Remco Gerlich



More information about the Python-list mailing list