From 0ad2b4d09b882ee11991b26685ca3d24ba9ab51f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 9 Sep 2014 21:03:15 +0800 Subject: [PATCH] transform/inline: fix subscript handling --- artiq/transforms/inline.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/artiq/transforms/inline.py b/artiq/transforms/inline.py index a2cc9b87f..bf811af5a 100644 --- a/artiq/transforms/inline.py +++ b/artiq/transforms/inline.py @@ -96,7 +96,7 @@ class _ReferenceManager: evd.update(inspect.getmodule(obj).__dict__) return eval_ast(ref, evd) else: - raise KeyError + raise KeyError(ast.dump(ref)) def set(self, obj, funcname, name, value): self.to_inlined[(id(obj), funcname, name)] = value @@ -147,7 +147,6 @@ class _ReferenceReplacer(ast.NodeTransformer): visit_Name = visit_ref visit_Attribute = visit_ref - visit_Subscript = visit_ref def visit_Call(self, node): func = self.rm.get(self.obj, self.funcname, node.func)