Lesson 087: Inheritance, super(), delegation patterns
Focus
Prints are breadcrumbs, not ornamentation: Intermediate drills Inheritance, super(), delegation patterns; spin token 728172 makes this page unlike its neighbours.
Key ideas
- Angle
Intermediate: micro cadence7mixesInheritance, super(), delegation patterns; spin50786. - Ritual: Mirror the snippet with reversed iteration order verbally.
- Guardrail: separate demo-trick from shipping discipline verbally.
Example (LESSON_UID = "intermediate-087")
# Intermediate drill L087 topic-8 micro-6 pattern-12
LESSON_UID = "intermediate-087"
spin_a, spin_b, spin_c = 505, 500, 499
from io import StringIO
buf = StringIO()
rounds = 3 + 6 % 5
for idx in range(rounds):
buf.write(f"seg-{idx}-{(idx * 87 + spin_b) % 997}\n")
buf.seek(0)
dump = buf.read()
print("lines", dump.count("\n"))
print("peek", dump.splitlines()[0] if dump else "<empty>")
from pathlib import Path
import tempfile
with tempfile.TemporaryDirectory() as scratch:
target = Path(scratch) / "scratch-87.txt"
snap = [100, 615, 139, 654, 178]
target.write_text("\n".join(str(x) for x in snap), encoding="utf-8")
print("scratch_bytes", target.stat().st_size, "rolling", sum(snap) % (499 + 131))
Practice
Practice 26: Verbal-diff this against lesson 86 aloud. Literal nudge 26.
Fingerprints
- lesson_uid:
intermediate-087 - umbrella band:
Inheritance, super(), delegation patterns(7/10) - lesson_index:
2795