mirror of
https://github.com/rjNemo/design-patterns
synced 2026-06-06 02:26:40 +00:00
* doc: add proxy README documentation * doc: edit general README files * add proxy code example Co-authored-by: Ruidy <r.nemausat@empfohlen.de>
13 lines
447 B
Python
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.")
|