From 0e07b60a4e44129cfafaeacac765cf957e2ea219 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Sun, 9 Jul 2006 16:16:34 +0000 Subject: Fix AST compiler bug #1501934: incorrect LOAD/STORE_GLOBAL generation. --- Python/compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 5bda62edea..3ddb0677d0 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -3688,7 +3688,8 @@ compiler_augassign(struct compiler *c, stmt_ty s) VISIT(c, expr, auge); break; case Name_kind: - VISIT(c, expr, s->v.AugAssign.target); + if (!compiler_nameop(c, e->v.Name.id, Load)) + return 0; VISIT(c, expr, s->v.AugAssign.value); ADDOP(c, inplace_binop(c, s->v.AugAssign.op)); return compiler_nameop(c, e->v.Name.id, Store); -- cgit v1.2.1