Child Class constructor using super() - getting unbound method __init__()
问题 I'm trying to create classmethod constructors for a child class, but I cannot initialize the instance properly. I have read many blogs and answers on this site and even tried exactly what some other people have posted, still to no avail. Hopefully I'm missing something really simple. Basic example of what I'm trying: class A(object): def __init__(self, foo): self.foo = foo class B(A): @classmethod def make_new(cls): super(B, cls).__init__('bar') foobar = B.make_new() I keep getting unbound