On Tue, 08 Aug 2006 14:50:39 +0200 Wildemar Wildenburger <[EMAIL PROTECTED]> wrote:
> Or you could always just use the __new__() method instead of > __init__(), putting all your initialization into the above > except-block. If you replace 'cls._it = ...' with 'self = cls_it = > ...' you'll feel right at home too :). > > Anything 'unpythonic' (gosh how I hate that word ;)) about that, BTW? Yes. :) You'll have to make a custom Singleton class for each subclass you want to make a singleton, instead of just creating a custom _init method for each one of them. You can use the subclass __new__, but that's definitely 'unpythonic'. -- Pedro Werneck -- http://mail.python.org/mailman/listinfo/python-list