Static Class Initialization Question.

2008-07-04 Thread Thomas Troeger
Hello, I have a class that looks like this: class A(object): def __init__(self, a=0, b=1): self.a, self.b=a, b def __str__(self): return %s(%d,%d) % (type(a).__name__, self.a, self.b) I want to have a list of such classes instantiated

Re: Static Class Initialization Question.

2008-07-04 Thread Bruno Desthuilliers
Thomas Troeger a écrit : Hello, I have a class that looks like this: class A(object): def __init__(self, a=0, b=1): self.a, self.b=a, b def __str__(self): return %s(%d,%d) % (type(a).__name__, self.a, self.b) Given the output example you give, I assume there's a

Re: Static Class Initialization Question.

2008-07-04 Thread Thomas Troeger
Bruno Desthuilliers wrote: return %s(%d,%d) % (type(self).__name__, self.a, self.b) Er, yes exactly! I noticed it a few seconds after I had sent the message ;-( I want to have a list of such classes instantiated automatically on Of course I meant class instances ... sorry :) It's

Re: Static Class Initialization Question.

2008-07-04 Thread Marc 'BlackJack' Rintsch
On Fri, 04 Jul 2008 14:59:05 +0200, Thomas Troeger wrote: Bruno Desthuilliers wrote: I want to have a list of such classes instantiated automatically on Of course I meant class instances ... sorry :) It's always good to have an example to compensate for English errors *g*. Well, class