when it shouldn't.
I was able to repro this in cases where a nested function is defined, i.e:
def foo():
def inner():
pass
In RustPython:
>>>>> foo.__code__.co_names
('__doc__',)
while in Python:
>>> foo.__code__.co_names
()
and also when compiling a module from a source string:
stmts = """
import blah
def foo():
pass
"""
code = compile(stmts, "<test>", "exec")
In RustPython:
>>>>> code.co_names
('blah', '__doc__', 'foo')
while in Python:
>>> code.co_names
('blah', 'foo')
not entirely sure how easy the fix might be.
when it shouldn't.
I was able to repro this in cases where a nested function is defined, i.e:
In RustPython:
while in Python:
and also when compiling a module from a source string:
In RustPython:
while in Python:
not entirely sure how easy the fix might be.