initializing cooperative method

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Thu Sep 6 18:42:56 CEST 2007


On Thu, 06 Sep 2007 16:12:11 +0000, jelle wrote:

> Hi,
> 
> I'm writing a bunch of abstract classes and I'd like to delegate the
> arguments of the concrete class the to abstract one. I was surprised to
> see that the print statement in the abstract class isn't executed. But
> moreover, I'd like to find out an idiom that allows one to delegate
> arguments in the inherited class. Any ideas?

Change the call to super() in Concrete from:

super(Abstract, self).__init__(a, b)

to

super(Concrete, self).__init__(a, b)



-- 
Steven.




More information about the Python-list mailing list