0

This is my example:

class FirstBase(object):

    def __init__(self, firstarg):
        self.first = firstarg

class SecondBase(object):

    def __init__(self, secondarg):
        self.second = secondarg

class Child(FirstBase, SecondBase):

    def __init__(self, firstarg, secondarg):
        FirstBase.__init__(self, firstarg)
        SecondBase.__init__(self, secondarg)

The problem is that how can I initialize Child with the super() function, I know that in this case super().__init__()will only call FirstBase's __init__().

BenMorel
  • 34,448
  • 50
  • 182
  • 322
cncggvg
  • 657
  • 6
  • 12
  • You need `FirstBase.__init__` and `SecondBase.__init__` to *also* call `super().__init__` - see [this answer](http://stackoverflow.com/a/16310777/3001761) on the duplicate. – jonrsharpe Sep 04 '14 at 13:31
  • See also http://stackoverflow.com/q/8013076/3001761 – jonrsharpe Sep 04 '14 at 14:25

0 Answers0