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

Class ExtendedAbstraction

src/Bridge/Conceptual/main.py:50–60  ·  view source on GitHub ↗

EN: You can extend the Abstraction without changing the Implementation classes. RU: Можно расширить Абстракцию без изменения классов Реализации.

Source from the content-addressed store, hash-verified

48
49
50class ExtendedAbstraction(Abstraction):
51 """
52 EN: You can extend the Abstraction without changing the Implementation
53 classes.
54
55 RU: Можно расширить Абстракцию без изменения классов Реализации.
56 """
57
58 def operation(self) -> str:
59 return (f"ExtendedAbstraction: Extended operation with:\n"
60 f"{self.implementation.operation_implementation()}")
61
62
63class Implementation(ABC):

Callers 1

main.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected