Answer the question
In order to leave comments, you need to log in
How to make a kind of "Factory" to support peculiar "Configurations" with such inheritance features?
Suppose there are several files:
scheme.py
scheme.One.py
scheme.Two.py
scheme.*.py
***
In the scheme.py file, the Scheme class is declared with all the attributes that are generally necessary:
class Scheme:
_VAR = 'Common Scheme Class'
def function_common(self):
return 'Function Common'
def function_first(self):
return 'Function First'
def function_second(self):
return 'Function Second'
class Scheme:
_VAR = 'One Scheme Class'
def function_first(self):
return 'Function One'
class Scheme:
_VAR = 'Two Scheme Class'
def function_second(self)
return 'Function Two'
class SchemeOne(Scheme):
_VAR = 'One Scheme Class'
def function_second(self):
return 'Function Seconf Two Scheme Class'
def function_third(self):
return 'Function Third'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question