EN: You can extend the Abstraction without changing the Implementation classes. RU: Можно расширить Абстракцию без изменения классов Реализации.
| 48 | |
| 49 | |
| 50 | class 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 | |
| 63 | class Implementation(ABC): |