File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
"""
3
3
*What is this pattern about?
4
- The Decorator pattern is used to dinamically add a new feature to an
4
+ The Decorator pattern is used to dynamically add a new feature to an
5
5
object without changing its implementation. It differs from
6
6
inheritance because the new feature is added only to that particular
7
7
object, not to the entire subclass.
11
11
italic) to a text by appending the corresponding tags (<b> and
12
12
<i>). Also, we can see that decorators can be applied one after the other,
13
13
since the original text is passed to the bold wrapper, which in turn
14
- is passsed to the italic wrapper.
14
+ is passed to the italic wrapper.
15
15
16
16
*Where is the pattern used practically?
17
17
The Grok framework uses decorators to add functionalities to methods,
You can’t perform that action at this time.
0 commit comments