Re: python singletons

2008-03-05 Thread Malcolm Tredinnick
On Wed, 2008-03-05 at 02:40 -0800, Thierry wrote: > Basically the effect of implementing a singleton in php. > Not sharing anything between requests. > But sharing during on request. > > For instance you would have one javascript object, which you get > through getInstance() > It always returns

Re: python singletons

2008-03-05 Thread Thierry
Basically the effect of implementing a singleton in php. Not sharing anything between requests. But sharing during on request. For instance you would have one javascript object, which you get through getInstance() It always returns the same object with a list of js files. Then in the view or wher

Re: python singletons

2008-03-03 Thread Malcolm Tredinnick
On Mon, 2008-03-03 at 02:12 -0800, Thierry wrote: > Implementing a singleton is slightly different in python. > When you create a singleton it actually ends up remembering state > across requests. > I tried several on this list: > http://c2.com/cgi/wiki?PythonSingleton > > So if i have a groups

python singletons

2008-03-03 Thread Thierry
Implementing a singleton is slightly different in python. When you create a singleton it actually ends up remembering state across requests. I tried several on this list: http://c2.com/cgi/wiki?PythonSingleton So if i have a groups list and i append to it, for every request to the server i have e