[Tutor] SubClassing

Ismael Garrido ismaelgf at adinet.com.uy
Fri Feb 25 07:08:43 CET 2005


Hello

My code is like this:

class Parent:
    def __init__(self, bunch, of, variables):
       self.bunch, self.of, self.variables = bunch, of, variables

class Son(Parent):
    def __init__(self, bunch, of, variables, new):
       self.bunch, self.of, self.variables, self.new = bunch, of, 
variables, new

What I want to know is, is there a better way to write Son class? One in 
which I don't have to copy&paste the parent's init?

Thanks
Ismael


More information about the Tutor mailing list