chapter 10: Python Design Patterns I

The decorator pattern 709 The observer pattern 715 The strategy pattern 718 The state pattern 721 The singleton pattern 728 The template pattern 733 Exercises 737 Summary

10.1 The decorator pattern

10.1.1 Linux

Automatic Install Script

$ sudo wget -qO- https://get.docker.com/ | sh

remove hell-world

$ sudo docker rm `sudo docker ps -aq`
$ sudo docker rmi hello-world

.

10.2 The observer pattern

10.3 The strategy pattern

10.4 The state pattern

10.5 The singleton pattern

10.6 The template pattern

10.7 Exercises

10.8 Summary