design-patterns/structural/proxy/real_subject.py
Ruidy 18dc62563c
Proxy (#13)
* doc: add proxy README documentation

* doc: edit general README files

* add proxy code example

Co-authored-by: Ruidy <r.nemausat@empfohlen.de>
2020-09-29 21:08:07 +02:00

13 lines
447 B
Python

from structural.proxy.subject import Subject
class RealSubject(Subject):
"""
The RealSubject contains some core business logic. Usually, RealSubjects are
capable of doing some useful work which may also be very slow or sensitive -
e.g. correcting input data. A Proxy can solve these issues without any
changes to the RealSubject's code.
"""
def request(self) -> None:
print("RealSubject: handling request.")