Summary
Python is a bit unlike other languages in some aspects and several design patterns that are common in other languages make little sense in Python. In this chapter, you have seen some common Python design patterns, but many more patterns exist. Before you start implementing your own collections based on these patterns, quickly search the web to see whether there is an existing solution already. In particular, the collections
module receives a lot of updates, so it is possible that your problem has already been solved.
If you are ever wondering how these structures work, have a look at the following source:https://github.com/python/cpython/blob/master/Lib/collections/__init__.py.
After finishing this chapter, you should be aware of the time complexities of the basic Python structures. You should also be familiar with a few Pythonic methods of tackling certain problems. Many of these examples use the collections
module, but this chapter does not list all of the classes...