diff Python/ast.c @ 47524:53253f36014e legacy-trunk

warn about parameter tuple unpacking
author Benjamin Peterson <benjamin@python.org>
date Sun, 08 Jun 2008 23:00:00 +0000
parents d56450db60a2
children 52294af4b663
line wrap: on
line diff
--- a/Python/ast.c	Sun Jun 08 22:52:37 2008 +0000
+++ b/Python/ast.c	Sun Jun 08 23:00:00 2008 +0000
@@ -701,6 +701,9 @@
                     /* 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;