Right now, my project has the following structure :
main.py
-------
class main_fun(object):
def __init__(self, <parameters>):
ops.py
------
class ops_fun(main_fun):
def __init__(self):
super(ops_fun, self).__init__(<parameters>)
It essentially translates to the following :
------------------
main_fun (main.py)
------------------
|
|
----------------
ops_fun (ops.py)
----------------
I would like to split/restructure the above into the following :
------------------
main_fun (main.py)
------------------
/ | \
/ | \
---------------- ---------------- ----------------
AuxOps (aops.py) === CoreOps (cops.py) === DerOps (dops.py)
---------------- ---------------- ----------------
\ | /
\ | /
------------------
con_fun (contf.py)
------------------
Which basically means that I want to :
- inherit all methods/functions and variables from the class
main_funto each ofAuxOps,CoreOps,DerOpsandcon_fun. - have different methods/functions implemented in each of
AuxOps,CoreOpsandDerOps, should be inherited in each others' classes. i.e.,AuxOpsshould inherit every method inCoreOpsandDerOps,DerOpsshould inherit every method inCoreOpsandAuxOps. - inherit each of
AuxOps,CoreOpsandDerOpsincon_fun(Does inheriting these automatically inheritmain_fun, since it is the parent of these?).
How can I achieve the above?