Python technical articles

Python articles for working developers

Clear explanations of the details that shape real programs.

Explore Python language behavior, the standard library, concurrency, and object-model details that affect real programs.

Latest articles

15 articles

Object modelAug 28, 20264 min read

Python Class Creation Runs a Defined Hook Sequence

The order of metaclass selection, namespace preparation, class-body execution, __set_name__, __init_subclass__, and decorators.

  • class creation
  • metaclasses
  • subclass hooks
Language semanticsAug 25, 20264 min read

Python Closures Resolve Names When Called

Why closures created in loops share late-bound names, plus reliable capture patterns and nonlocal state.

  • closures
  • scope
  • functions
PythonJul 28, 20266 min read

The GIL Is Not a Thread-Safety Contract

What CPython's interpreter lock does, where it is released, and why shared-state invariants still need synchronization.

  • threading
  • GIL
  • concurrency