El Wednesday 23 May 2007 08:09:15 Paul Giannaros escribió:
> On Wednesday 23 May 2007 05:53:58 Nahuel Defossé wrote:
> > I saw in ActiveState page the folowing code to make a singleton:
> > class Borg:
> > __shared_state = {}
> > def __init__(self):
> > self.__dict__ = self.__shared
On Wednesday 23 May 2007 05:53:58 Nahuel Defossé wrote:
> I saw in ActiveState page the folowing code to make a singleton:
> class Borg:
> __shared_state = {}
> def __init__(self):
> self.__dict__ = self.__shared_state
> # and whatever else you want in your class -- that's all!
I saw in ActiveState page the folowing code to make a singleton:
class Borg:
__shared_state = {}
def __init__(self):
self.__dict__ = self.__shared_state
# and whatever else you want in your class -- that's all!
And in all Qt classes I customize via inheritance I do the folowing