Lesson 138: Returning useful values early
Focus
Let the literals expose mistaken assumptions quickly: Basic drills Returning useful values early; spin token 1135488 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence8mixesReturning useful values early; spin39730. - Ritual: Describe falsifying evidence that would veto this pattern.
- Guardrail: name the surprise that triggered when literals shifted.
Example (LESSON_UID = "basic-138")
# Basic drill L138 topic-13 micro-7 pattern-3
LESSON_UID = "basic-138"
spin_a, spin_b, spin_c = 250, 353, 565
sentinel = ([] or [])
sentinel = sentinel or [2]
print(bool(sentinel), sentinel)
pick = sentinel or "fallback-7"
print("chosen", pick)
Practice
Practice 25: Swap print order once; reconcile dependency thinking. Literal nudge 25.
Fingerprints
- lesson_uid:
basic-138 - umbrella band:
Returning useful values early(8/10) - lesson_index:
4434