Anybody know why the Cascade class has a method startState(self) that overrides the SM class variable startState? And why this is required for a Feedback machine that uses a Cascade machine? I find if I remove the assignment of the Cascade's startState method to the Feedback instance's startState variable - the Feedback machine won't work (for a simple counter - INCR->DELAY). WHY?
def __init__(self, sm): self.m = sm #self.startState = self.m.startState print 'Feedback startState = ' + str(self.m.startState) Above is the Feedback's __init__ method. If I comment out the line as in the above, what does that change? Specifically when sm is a Cascade machine.
ignore the print statement that was just my debugging (actually what was printed was a memory address to the location of the method Cascade.startState)
Join our real-time social learning platform and learn together with your friends!