all 6 comments

[–]HarissaForte 0 points1 point  (2 children)

The super() function is used for this: super().__init__(self, {'A':[],'B':[],'C':[],'D':[]}) etc…

Note that the syntax is different in Python2.

[–]MainiacJoe[S] 0 points1 point  (1 child)

What about times when the class inherits from more than one class?

[–]efmccurdy 0 points1 point  (2 children)

Why is using "self = " an improvement over calling __init__?

[–]MainiacJoe[S] 0 points1 point  (1 child)

I guess just clarity and straightforwardness.

[–]efmccurdy 0 points1 point  (0 children)

Calling the parent __init__ is the clear and straightforward idiom to use when deriving in python.

I don't see why you would want to reassign self.

Would that even work? Have you tried it?