Skip to content
Snippets Groups Projects
Commit c3bc8d7b authored by Damien George's avatar Damien George
Browse files

tests/basics/builtin_locals: Add test for using locals() in class body.

parent 84895f1a
No related branches found
No related tags found
No related merge requests found
......@@ -2,3 +2,12 @@
x = 123
print(locals()['x'])
class A:
y = 1
def f(self):
pass
print('x' in locals())
print(locals()['y'])
print('f' in locals())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment