MCPcopy Create free account
hub / github.com/RefactoringGuru/design-patterns-python / ConcreteStateB

Class ConcreteStateB

src/State/Conceptual/main.py:112–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110
111
112class ConcreteStateB(State):
113 def handle1(self) -> None:
114 print("ConcreteStateB handles request1.")
115
116 def handle2(self) -> None:
117 print("ConcreteStateB handles request2.")
118 print("ConcreteStateB wants to change the state of the context.")
119 self.context.transition_to(ConcreteStateA())
120
121
122if __name__ == "__main__":

Callers 1

handle1Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected