Hacker News new | ask | show | jobs
by tpoacher 608 days ago
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/