# Inheritance
## CS Concepts — The Codex Coding
**URL:** https://thecodex.expert/coding/concepts/inheritance/
**Type:** concept | **Confidence:** high | **Last verified:** 2026-06-01

## CANONICAL DEFINITION
Inheritance is a mechanism by which a class (subclass) acquires the attributes and methods of another class (superclass), enabling code reuse through is-a relationships and allowing method overriding to specialise inherited behaviour.

## REQUIRES
concepts/classes, paradigms/object-oriented

## ENABLES
concepts/polymorphism, software-engineering/design-patterns

## COMMONLY CONFUSED WITH
inheritance != composition (prefer composition for reuse); super() follows MRO not direct parent; always call super().__init__() when overriding

## SOURCES
- Liskov & Wing 1994 ACM TOPLAS 16(6)
- Barrett et al. 1996 OOPSLA
- Python abc module docs
- Java Language Specification §8.4.8

*The Codex Coding — thecodex.expert/coding/ — Free forever — Mumbai, India*
