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

This commit is contained in:
Damien George 2017-11-27 14:14:57 +11:00
parent 84895f1a21
commit c3bc8d7b2b

View File

@ -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())