← Curriculum track ← Learn hub
Quanta GenAI Curriculum · Python · Basic

Python Basic — 147: Guard process fences with typing overload tact centred on `Scope, locals, and shadowing pitfalls` [128640]

Lesson 147: Scope, locals, and shadowing pitfalls

Focus

Assume a reviewer executes this verbatim: Basic drills Scope, locals, and shadowing pitfalls; spin token 1205393 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-147")

# Basic drill L147 topic-14 micro-6 pattern-2
LESSON_UID = "basic-147"
spin_a, spin_b, spin_c = 872, 331, 16

blob = "64|G"
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 29: Enumerate three pytest markers you'd decorate if this lived in CI. Literal nudge 29.

Fingerprints