class singleton(object)def __new__(cls* ** )if not hasattr(cls'_inst')cls _inst super(singletoncls __new__(cls* **kreturn cls _inst subclassing is problemthoughclass foo(singleton)pass class bar(foo)pass foo() bar()??problem is intrinsic to singleton