design-patterns/structural/proxy/real_subject.py
2020-09-29 21:03: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.")