Hacker News new | ask | show | jobs
by asplake 613 days ago
I sometimes think it would be fun to do “do: ... where:/while/until”, wherein the “where” part does local bindings.
1 comments

there is a nice "staticscope" package in python, which acts as a context manager, and does pretty much what you refer to. pretty neat.

https://pypi.org/project/scoping/