Skip to main content

Course

Python

PythonPart 4 of 7 · Chapter 4 of 4

Reusing Behaviour Without Copying It

Two classes that share eighty percent of their behaviour usually end up as two copies of that eighty percent. Write the shared part once, inherit it in both, and override only what actually differs.


Make a free account to read on

Every chapter is free — an account lets your course progress follow you from your laptop to your phone. No payment, no trial.