Conditions | 1 |
Total Lines | 14 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """Proxy structural software pattern. |
||
41 | >>> proxy = PlusTen(plus_one) |
||
42 | >>> proxy(2) |
||
43 | 13 |
||
44 | """ |
||
45 | |||
46 | def __init__(self, runtime_proxy: T): |
||
47 | self._proxy_subject = runtime_proxy |
||
48 | |||
49 | def __getattr__(self, name: str): |
||
50 | return getattr(self._proxy_subject, name) |
||
51 | |||
52 | def __str__(self): |
||
53 | return str(self._proxy_subject) |
||
54 | |||
55 | def __hash__(self): |
||
57 |