8. Composite
1. Motivation
- Treat individual or group of objects uniformly
- e.g. Have similar API for
Fooand sequence ofFoo.
Geometric shapes
Neural Networks
Summary
- Composition
- Composed and singular objects need similar / identical behviours
- Python
__iter__andIterable ABC