mirror of
https://github.com/rjNemo/design-patterns
synced 2026-06-06 02:26:40 +00:00
24 lines
613 B
Python
24 lines
613 B
Python
class Subsystem1:
|
|
"""
|
|
The Subsystem can accept requests either from the facade or client directly.
|
|
In any case, to the Subsystem, the Facade is yet another client, and it's
|
|
not a part of the Subsystem.
|
|
"""
|
|
|
|
def operation1(self) -> str:
|
|
return "Subsystem1: Ready!"
|
|
|
|
def operation_n(self) -> str:
|
|
return "Subsystem1: Go!"
|
|
|
|
|
|
class Subsystem2:
|
|
"""
|
|
Some facades can work with multiple subsystems at the same time.
|
|
"""
|
|
|
|
def operation1(self) -> str:
|
|
return "Subsystem2: Get ready!"
|
|
|
|
def operation_z(self) -> str:
|
|
return "Subsystem2: Fire!"
|