EN: Usually, the Context accepts a strategy through the constructor, but also provides a setter to change it at runtime. RU: Обычно Контекст принимает стратегию через конструктор, а также предоставляет сеттер для её изменения во время выполнения.
(self, strategy: Strategy)
| 25 | """ |
| 26 | |
| 27 | def __init__(self, strategy: Strategy) -> None: |
| 28 | """ |
| 29 | EN: Usually, the Context accepts a strategy through the constructor, but |
| 30 | also provides a setter to change it at runtime. |
| 31 | |
| 32 | RU: Обычно Контекст принимает стратегию через конструктор, а также |
| 33 | предоставляет сеттер для её изменения во время выполнения. |
| 34 | """ |
| 35 | |
| 36 | self._strategy = strategy |
| 37 | |
| 38 | @property |
| 39 | def strategy(self) -> Strategy: |
nothing calls this directly
no outgoing calls
no test coverage detected