-
Notifications
You must be signed in to change notification settings - Fork 304
Open
Labels
coreIssues relating to core functionality (e.g. syntax)Issues relating to core functionality (e.g. syntax)
Description
a = locals
def test():
return a()
assert test() == {}It looks like there's an optimization to only create a locals dictionary when needed. However the way it determines if it's needed is by looking at the name of the call expression (see IronPython.Compiler.Ast.CallExpression.NeedsLocalsDictionary). NeedsLocalsDictionary returns false in the example above.
Similarly this will also fail for dir, vars, eval and exec...
Metadata
Metadata
Assignees
Labels
coreIssues relating to core functionality (e.g. syntax)Issues relating to core functionality (e.g. syntax)