I have two classes. In one class, I have lots of methods that run based one on variable.
And in a second class, I want to define a second variable, where the methods of class one run, when this variable is true.
However, I'm not sure how to write this.
I want to know how do define the new variable (in the second class) and ensure this variable in the second class replaces the variable in the first class (when this variable is true).
For example:
class One():
def MethodOne( self ):
if self.this.VariableOne:
do something
do something else
do another thing
return something
class Two(One):
def MethodOne( self ):
if self.this.VariableTwo:
run all the other code in MethodOne(), (if the variable is VariableTwo, but replacing VariableOne.
I'm not sure on the best approach here.
But I still want the MethodOne method to run (from a different class), but using a different variable instead.