-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
C-bugSomething isn't workingSomething isn't working
Description
when it shouldn't.
I was able to repro this in cases where a nested function is defined, i.e:
def foo():
def inner():
passIn 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.
Metadata
Metadata
Assignees
Labels
C-bugSomething isn't workingSomething isn't working