Skip to content

Commit 7681bbd

Browse files
authored
enhance yop document
add a little more description and references
1 parent 184b1a4 commit 7681bbd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

patterns/structural/proxy.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
"""
2+
*What is this pattern about?
3+
Proxy is used in places where you want to add functionality to a class without changing its interface. The main class is called `Real Subject`. A client should use the proxy or the real subject without any code change, so both must have the same interface. Logging and controlling access to the real subject are some of the proxy pattern usages.
4+
5+
*References:
6+
https://refactoring.guru/design-patterns/proxy/python/example
7+
https://python-3-patterns-idioms-test.readthedocs.io/en/latest/Fronting.html
8+
29
*TL;DR
310
Provides an interface to resource that is expensive to duplicate.
411
"""

0 commit comments

Comments
 (0)