Things as certain as death and taxes, can be more firmly believed.
—Daniel Defoe, The Political History of the Devil
Dynamic typing is one of the most praised features of Python. Praised because it allows for rapid development. But dynamic typing also has a dark side. Dynamic typing also means that there is no certainty of receiving a certain type of object—anywhere in the program. In this chapter we will examine why dynamic typing is a risk and how this risk can be mitigated. As an example let us consider that we want to add a high score list to our game. A simple high score list contains ...