Reading this also made me realize I've had a soft spot for dynamic scoping/implicits for a long time… probably since I first used @mitsuhiko's Flask, where the request context object was just there without you having to pass it around. Felt like magic, then felt like a footgun, then felt like a reasonable tradeoff again. Python has since put contextvars in the standard library, which is essentially the same idea.

docs.python.org
contextvars — Context Variables
This module provides APIs to manage, store, and access context-local state. The ContextVar class is used to declare and work with Context Variables. The copy_context() function and the Context clas...
