Skip to content

Commit b1d7a44

Browse files
committed
Replace the example of the composite pattern
The previous example a little wordy. We can use less code to describe the composite pattern. Less code allows us to focus on the pattern self.
1 parent 4934f2c commit b1d7a44

File tree

2 files changed

+60
-317
lines changed

2 files changed

+60
-317
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ __Structural Patterns__:
2828
|[3-tier](structural/3-tier.py)| data<->business logic<->presentation separation (strict relationships) |
2929
|[adapter](structural/adapter.py)| adapt one interface to another using a white-list |
3030
|[bridge](structural/bridge.py)| a client-provider middleman to soften interface changes |
31-
|[composite](structural/composite.py)|encapsulate and provide access to a number of different objects|
31+
|[composite](structural/composite.py)|lets clients treat individual objects and compositions uniformly|
3232
|[decorator](structural/decorator.py)| wrap functionality with other functionality in order to affect outputs |
3333
|[facade](structural/facade.py)| use one class as an API to a number of others |
3434
|[flyweight](structural/flyweight.py)| transparently reuse existing instances of objects with similar/identical state |

0 commit comments

Comments
(0)