J
J
JRazor2014-07-22 23:24:26
Python
JRazor, 2014-07-22 23:24:26

How to organize a call to the method of the parent of two classes?

Hello. In Python, calling a parent method is organized like this

class Child(Parent):
        def __init__(self):
            Parent.__init__(self)

or like this
class Child(Parent):
    def __init__(self):
        super(Child, self).__init__()

But what if you inherit not one, but two or more classes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2014-07-23
@JRazor

habrahabr.ru/post/62203 - read here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question