Duck typing judges an object by whether it provides the behavior a caller needs, not by its declared class. Python checks the method call at runtime and raises AttributeError when the behavior is missing. section 3.5
The idea follows the familiar duck test: if something walks and quacks like a duck, treat it as a duck. This supports polymorphism while avoiding rigid inheritance hierarchies. section 3.5
A swappable tire
A Bicycle need not know a tire’s class. Any tire-like object can be substituted when it supplies the expected information and behavior, such as a FancyTire. Likewise, command objects can vary internally as long as they provide execute for the presentation layer. section 7.2.2


