> I think this use case is rather elegant: > > def singleton(cls): > return cls() > > class Foo [singleton]: > ... And how would this be better than class Foo(singleton): ... (with a suitable definition of singleton, which could just be 'object' AFAICT from your example)? --Guido van Rossum (home page: http://www.python.org/~guido/)