MAGIC#

Classes#

class utils.magic.persistent_locals(func)[source]#

Bases: object

A decorator class that allows access to the local variables of a function after it has been called.

Usage: @persistent_locals def my_function():

my_function() print(my_function.locals) # Access the local variables of my_function

clear_locals()[source]#

Clears the stored local variables.

property locals#

Returns the stored local variables.