summaryrefslogtreecommitdiff
path: root/tests/basics/fun_globals.py
AgeCommit message (Collapse)Author
2022-06-24tests/basics: Add tests for __name__ and __globals__ attrs on closures.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-01-29py/objfun: Support fun.__globals__ attribute.Damien George
This returns a reference to the globals dict associated with the function, ie the global scope that the function was defined in. This attribute is read-only but the dict itself is modifiable, per CPython behaviour. Signed-off-by: Damien George <damien@micropython.org>