tocodeil/python-design-patterns-demo
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
When Decorator?
* many types of classes
* composable
* create new types at runtime
When Composite?
* many types of "things"
* we know all the types in advance
* we want to treat DIFFERENT things
in the same way
1. Singleton
- configuration
- logging
2. Composite
- Trees
- box
- UI
3. Decorator
- files
- network
4. Factory