G
G
GoodOrlov2018-04-11 20:57:49
Python
GoodOrlov, 2018-04-11 20:57:49

What do these 3 lines do? Python. OOP. __init__ constructor with super() call?

class Mycllass(a, **kwargs):
def __init__(self, **kwargs):
super(Mycllass, self).__init__(**kwargs)
What happens? And what does this have to do with metaclasses?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-04-11
@GoodOrlov

Declaration of a class MyClassthat inherits from a class a;
Class constructor declaration;
Calling the constructor of the parent class.
It has nothing to do with metaclasses.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question