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

Method handle2

src/State/Conceptual/main.py:116–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

nothing calls this directly

Calls 2

ConcreteStateAClass · 0.85
transition_toMethod · 0.80

Tested by

no test coverage detected