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

Method handle1

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

Source from the content-addressed store, hash-verified

101
102class ConcreteStateA(State):
103 def handle1(self) -> None:
104 print("ConcreteStateA handles request1.")
105 print("ConcreteStateA wants to change the state of the context.")
106 self.context.transition_to(ConcreteStateB())
107
108 def handle2(self) -> None:
109 print("ConcreteStateA handles request2.")

Callers

nothing calls this directly

Calls 2

ConcreteStateBClass · 0.85
transition_toMethod · 0.80

Tested by

no test coverage detected