"Dave Thomas" wrote .... > Except... > > How can a singleton have arguments to 'instance' when the underlying > object is constructed only once? You get a kind of 'first one in wins' > situation: > > > a = SomeClass.instance(1, 2, 3) > > # .... > > b = SomeClass.instance('a, 'b', 'c') > > # ... Much confusion and gnashing of teeth agreed > > > Perhaps a better approach might be to have a call that sets the > parameters to be used when the object is created: > > SomeClass.set_init_args(1, 2, 3) > > a = SomeClass.instance -- will do new(1, 2, 3) > > b = SomeClass.instance -- will reuse existing object > > It would be a runtime error to call set_init_args more than once or > call it after the object has been created. What would you if one thread is busy calling ``set_init_args(1, 2, 3)'' and while another would be calling the ``instance' method. It seems to me that you need to distribute the ``instancation logic'' over two methods (set_init_args and instance). Personally I doubt that it is really worth the trouble. In the most cases it is probably enough to modify ``initialize'' in such way that ``new'' picks up the correct initializing values ... /Christoph