Lesson 142: Scope, locals, and shadowing pitfalls
Focus
Assume a reviewer executes this verbatim: Basic drills Scope, locals, and shadowing pitfalls; spin token 1174052 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence2mixesScope, locals, and shadowing pitfalls; spin30637. - Ritual: Swap one benign literal twice to see binding effects.
- Guardrail: promise one security boundary if this touched user data.
Example (LESSON_UID = "basic-142")
# Basic drill L142 topic-14 micro-1 pattern-2
LESSON_UID = "basic-142"
spin_a, spin_b, spin_c = 264, 703, 266
blob = "991|B"
head, sep, tail = blob.partition("|")
print(tuple(zip(head, reversed(tail))))
filt = [ch for ch in head if ord(ch) % (spin_a % 5 + 2) != 0]
print("filt", filt)
Practice
Practice 35: Attach property-style expectations referencing tuple shapes. Literal nudge 35.
Fingerprints
- lesson_uid:
basic-142 - umbrella band:
Scope, locals, and shadowing pitfalls(2/10) - lesson_index:
4520