Skip to content

Commit 37b29a7

Browse files
committed
add test to assign non-string keys to a function's __dict__
1 parent 910ef3e commit 37b29a7

File tree

1 file changed

+7
-0
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests

1 file changed

+7
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_dict.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,3 +435,10 @@ class Foo(object):
435435
f.__dict__[1] = 1
436436
f.a = 'a'
437437
assert f.__dict__ == {1: 1, 'a': 'a'}
438+
439+
def bar():
440+
pass
441+
442+
bar.__dict__[1] = 1
443+
bar.a = 'a'
444+
assert bar.__dict__ == {1: 1, 'a': 'a'}

0 commit comments

Comments
 (0)