So I have looked at multiple examples of inheritance and constructors on here and I am a little unsure of myself.
So as I understand it you can call a class constructor within a constructor.
class A(Z):
def __init__(self):
super().__init__(self)
Right so... would this be a legitimate class call or should I refactor this?
class SubsManagement(Subs, Database_Tables):
def __init__(self, db_file):
Database_Tables.__init__(db_file)
self.conn, self.cur = Database_Tables.connect_database()
Subs.__init__(self.cur)
What would be my other options for this? This is a personal project btw.
EDIT: Alright, I looked at using a wrapper as per suggestion, but would that be basically making a chain of ancestor classes? If was a little vague as to my personal situation as the example in the non-cooperative classes does not build a constructor with arguments.