{
  "schema_version": "1.0",
  "codex": "thecodex.expert/coding",
  "type": "concept",
  "slug": "concepts/inheritance",
  "name": "Inheritance",
  "section": "CS Concepts",
  "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.",
  "confidence": "high",
  "last_verified": "2026-06-01",
  "source_count": 4,
  "url": "https://thecodex.expert/coding/concepts/inheritance/",
  "concept_relationship": {
    "requires_first": [
      "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": [
    {
      "num": 1,
      "citation": "Liskov & Wing 1994 ACM TOPLAS 16(6)",
      "tier": 1
    },
    {
      "num": 2,
      "citation": "Barrett et al. 1996 OOPSLA",
      "tier": 1
    },
    {
      "num": 3,
      "citation": "Python abc module docs",
      "tier": 1
    },
    {
      "num": 4,
      "citation": "Java Language Specification \u00a78.4.8",
      "tier": 1
    }
  ]
}