I'm new with python and having some trouble regarding inheritance.
i have this class:
class A(object):
def __init__(self, foo, bar):
pass
def func1(self):
op1()
op2()
def func2(self):
pass
I'm using another class that is overriding it :
class B(A):
def func2(self):
# do something
the problem is that I want to get func1 with all its operations and add for example op3()
so that when using this class I will have the option to use op1, op2 or op3.
I've tried using:
def func1(self):
op3()
but it just gave me the option of op3 without op1 and op2.
I saw that there is "super" option but I'm not sure I understand how to use it.
__init__, not_init_.