diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-06-08 23:00:00 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-06-08 23:00:00 (GMT) |
commit | f4fcdb6b8c0ee8bc4d2eee5ea3b848a4cd905ad6 (patch) | |
tree | 48d3512e81c0fe025d864ec2790d55a059aeeda1 /Python/ast.c | |
parent | d5efd2040642d08e64011fb6e81193002269aad4 (diff) | |
download | cpython-f4fcdb6b8c0ee8bc4d2eee5ea3b848a4cd905ad6.zip cpython-f4fcdb6b8c0ee8bc4d2eee5ea3b848a4cd905ad6.tar.gz cpython-f4fcdb6b8c0ee8bc4d2eee5ea3b848a4cd905ad6.tar.bz2 |
warn about parameter tuple unpacking
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c index ab166e8..ef0d8be 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -701,6 +701,9 @@ ast_for_arguments(struct compiling *c, const node *n) /* def foo((x)): is not complex, special case. */ if (NCH(ch) != 1) { /* We have complex arguments, setup for unpacking. */ + if (Py_Py3kWarningFlag && !ast_warn(c, ch, + "tuple parameter unpacking has been removed in 3.x")) + goto error; asdl_seq_SET(args, k++, compiler_complex_args(c, ch)); if (!asdl_seq_GET(args, k-1)) goto error; |