summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-23 13:25:31 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-23 13:25:31 (GMT)
commit6d8fb1a4446c59f4a20f64bbcd2ade9c91362e8c (patch)
tree3bb03542190ab4c0834beb9c13f7d1344b4a48c8 /Python/ast.c
parente36fe53d68b9fe8ff340ee8d7d35ab4822db69e0 (diff)
downloadcpython-6d8fb1a4446c59f4a20f64bbcd2ade9c91362e8c.zip
cpython-6d8fb1a4446c59f4a20f64bbcd2ade9c91362e8c.tar.gz
cpython-6d8fb1a4446c59f4a20f64bbcd2ade9c91362e8c.tar.bz2
And yet another fix for the patch. Paul Moore has send me a note that I've missed a declaration. The additional code has moved the declaration in the middle of the block.
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/Python/ast.c b/Python/ast.c
index a9bc2d4..b97da1d 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1336,15 +1336,16 @@ ast_for_atom(struct compiling *c, const node *n)
return Dict(keys, values, LINENO(n), n->n_col_offset, c->c_arena);
}
case BACKQUOTE: { /* repr */
+ expr_ty expression;
if (Py_Py3kWarningFlag) {
- if (PyErr_WarnExplicit(PyExc_DeprecationWarning,
- "backquote not supported in 3.x",
- "<unknown>", LINENO(n),
- NULL, NULL)) {
- return NULL;
- }
- }
- expr_ty expression = ast_for_testlist(c, CHILD(n, 1));
+ if (PyErr_WarnExplicit(PyExc_DeprecationWarning,
+ "backquote not supported in 3.x",
+ "<unknown>", LINENO(n),
+ NULL, NULL)) {
+ return NULL;
+ }
+ }
+ expression = ast_for_testlist(c, CHILD(n, 1));
if (!expression)
return NULL;