Lesson 164: Reading text streams safely (StringIO warmup)
Focus
Slow tempo wins; narrate checkpoints aloud: Basic drills Reading text streams safely (StringIO warmup); spin token 1351762 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence4mixesReading text streams safely (StringIO warmup); spin30215. - Ritual: Add one doctest-style assertion comment above hottest print.
- Guardrail: name the surprise that triggered when literals shifted.
Example (LESSON_UID = "basic-164")
# Basic drill L164 topic-16 micro-3 pattern-3
LESSON_UID = "basic-164"
spin_a, spin_b, spin_c = 354, 517, 326
sentinel = ([] or [])
sentinel = sentinel or [11]
print(bool(sentinel), sentinel)
pick = sentinel or "fallback-33"
print("chosen", pick)
Practice
Practice 21: Verbal-diff this against lesson 163 aloud. Literal nudge 21.
Fingerprints
- lesson_uid:
basic-164 - umbrella band:
Reading text streams safely (StringIO warmup)(4/10) - lesson_index:
5238