TLDR Web Dev · LAUNCHES & TOOLS

LOCALSCOPE

localscope.readthedocs.io4 min read

Summary from the TLDR Web Dev newsletter

Localscope is a Python library that helps prevent bugs in Jupyter notebooks by restricting the variables a function can access, avoiding accidental use of global variables. It achieves this through a decorator, `@localscope`, that raises an exception if a function attempts to use a global variable that hasn't been explicitly allowed.