transforms/inline: fix assign context on attributes

This commit is contained in:
Sebastien Bourdeauducq 2014-10-29 16:03:20 +08:00
parent c02589a230
commit 97ce1d6c2d
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ class _ReferenceReplacer(ast.NodeVisitor):
if isinstance(ival, ast.AST): if isinstance(ival, ast.AST):
return ival return ival
elif isinstance(ival, _UserVariable): elif isinstance(ival, _UserVariable):
return ast.copy_location(ast.Name(ival.name, ast.Load()), node) return ast.copy_location(ast.Name(ival.name, node.ctx), node)
else: else:
return value_to_ast(ival) return value_to_ast(ival)