python build in function (locals, ) - Serbipunk/notes GitHub Wiki
https://docs.python.org/3/library/functions.html
locals()
Update and return a dictionary representing the current local symbol table.
Free variables are returned by locals() when it is called in function blocks, but not in class blocks.
Note that at the module level, locals() and globals() are the same dictionary.