summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-23 09:10:36 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-23 09:10:36 (GMT)
commit729ab15370c8e7781f4781428364d203eb9f6416 (patch)
treed6981e5fd67b2fe08acd84b7a8cd824a10bceb5f /Python/ast.c
parent2336111aef67cf9946a468b757bcebbfcad713de (diff)
downloadcpython-729ab15370c8e7781f4781428364d203eb9f6416.zip
cpython-729ab15370c8e7781f4781428364d203eb9f6416.tar.gz
cpython-729ab15370c8e7781f4781428364d203eb9f6416.tar.bz2
Applied patch #1754273 and #1754271 from Thomas Glee
The patches are adding deprecation warnings for back ticks and <>
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 525b5a6..5555cf7 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1336,6 +1336,10 @@ 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 */
+ if (Py_Py3kWarningFlag &&
+ PyErr_Warn(PyExc_DeprecationWarning,
+ "backquote not supported in 3.x") < 0)
+ return NULL;
expr_ty expression = ast_for_testlist(c, CHILD(n, 1));
if (!expression)
return NULL;