A virtual method is selected dynamically from the object's class hierarchy. In Python, every method is virtual: if the current class does not define it, Python searches superclasses and uses the first matching implementation. section 15.6 section 15.15
The practical rules are:
- Inherit a method simply by defining a subclass without replacing that method. section 15.6
- Override a method by defining a method with the same name in the subclass; calls then use the subclass implementation. section 15.15
- Use virtual dispatch to share behavior across related classes while allowing specialized subclasses to replace it. section 15.6
Inherited movement
A Circle can use Shape.move even though Circle does not define move. Calling c.move(3, 4) updates the inherited coordinates and produces c.x = 3, c.y = 4. section 15.6


