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

Function client_code

src/Facade/Conceptual/main.py:101–114  ·  view source on GitHub ↗

EN: The client code works with complex subsystems through a simple interface provided by the Facade. When a facade manages the lifecycle of the subsystem, the client might not even know about the existence of the subsystem. This approach lets you keep the complexity under control.

(facade: Facade)

Source from the content-addressed store, hash-verified

99
100
101def client_code(facade: Facade) -> None:
102 """
103 EN: The client code works with complex subsystems through a simple interface
104 provided by the Facade. When a facade manages the lifecycle of the
105 subsystem, the client might not even know about the existence of the
106 subsystem. This approach lets you keep the complexity under control.
107
108 RU: Клиентский код работает со сложными подсистемами через простой
109 интерфейс, предоставляемый Фасадом. Когда фасад управляет жизненным циклом
110 подсистемы, клиент может даже не знать о существовании подсистемы. Такой
111 подход позволяет держать сложность под контролем.
112 """
113
114 print(facade.operation(), end="")
115
116
117if __name__ == "__main__":

Callers 1

main.pyFile · 0.70

Calls 1

operationMethod · 0.45

Tested by

no test coverage detected