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

Class Subject

src/Proxy/Conceptual/main.py:18–32  ·  view source on GitHub ↗

EN: The Subject interface declares common operations for both RealSubject and the Proxy. As long as the client works with RealSubject using this interface, you'll be able to pass it a proxy instead of a real subject. RU: Интерфейс Субъекта объявляет общие операции как для Реального

Source from the content-addressed store, hash-verified

16
17
18class Subject(ABC):
19 """
20 EN: The Subject interface declares common operations for both RealSubject
21 and the Proxy. As long as the client works with RealSubject using this
22 interface, you'll be able to pass it a proxy instead of a real subject.
23
24 RU: Интерфейс Субъекта объявляет общие операции как для Реального Субъекта,
25 так и для Заместителя. Пока клиент работает с Реальным Субъектом, используя
26 этот интерфейс, вы сможете передать ему заместителя вместо реального
27 субъекта.
28 """
29
30 @abstractmethod
31 def request(self) -> None:
32 pass
33
34
35class RealSubject(Subject):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected