8000 tests/basics/builtin_locals: Add test for using locals() in class body. · micropython/micropython-esp32@c3bc8d7 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit c3bc8d7

Browse files
committed
tests/basics/builtin_locals: Add test for using locals() in class body.
1 parent 84895f1 commit c3bc8d7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/basics/builtin_locals.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@
22

33
x = 123
44
print(locals()['x'])
5+
6+
class A:
7+
y = 1
8+
def f(self):
9+
pass
10+
11+
print('x' in locals())
12+
print(locals()['y'])
13+
print('f' in locals())

0 commit comments

Comments
 (0)
0