On 17 Jul., 00:20, Craig Allen <[EMAIL PROTECTED]> wrote: > > I have several classes in our system which need to act like > singletons, they are libraries of data classifications, and other such > libraries of configurations for the system which need to be global. > ... > > Is it pythonic?
My approach in this situation is to use the Borg pattern instead of singeltons. This is really pythonic, very simple and usefull. Look at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531 The german wikipedia shows another solution using metaclasse: http://de.wikipedia.org/wiki/Singleton_(Entwurfsmuster)#Das_Borg-Pattern Greetings, Uwe -- http://mail.python.org/mailman/listinfo/python-list