Lesson 085: Inheritance, super(), delegation patterns
Focus
Prints are breadcrumbs, not ornamentation: Intermediate drills Inheritance, super(), delegation patterns; spin token 741135 makes this page unlike its neighbours.
Key ideas
- Angle
Intermediate: micro cadence5mixesInheritance, super(), delegation patterns; spin38185. - Ritual: Freeze one literal constant with a purposeful name aloud.
- Guardrail: call out latent off-by-one before shipping analogues.
Example (LESSON_UID = "intermediate-085")
# Intermediate drill L085 topic-8 micro-4 pattern-9
LESSON_UID = "intermediate-085"
spin_a, spin_b, spin_c = 265, 851, 291
def helper(x, bias=139):
return (x * bias + 4) % 5009
samples = [helper(85 + k) for k in range(3 + 8 % 4)]
print(samples, max(samples) - min(samples))
from pathlib import Path
import tempfile
with tempfile.TemporaryDirectory() as scratch:
target = Path(scratch) / "scratch-85.txt"
snap = [98, 371, 644]
target.write_text("\n".join(str(x) for x in snap), encoding="utf-8")
print("scratch_bytes", target.stat().st_size, "rolling", sum(snap) % (291 + 131))
Practice
Practice 32: Swap print order once; reconcile dependency thinking. Literal nudge 32.
Fingerprints
- lesson_uid:
intermediate-085 - umbrella band:
Inheritance, super(), delegation patterns(5/10) - lesson_index:
2717