summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-05-18 05:44:29 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-05-18 05:44:29 (GMT)
commit094c9c921cc889f1aac99bbcc26b70b19f8ef1d9 (patch)
treeb1b277a2de09a9d534a9bebc1d5b563b7dc54258 /Python/ast.c
parent93d22ecc7c7e2d3413bb21e0264a293f7884caee (diff)
downloadcpython-094c9c921cc889f1aac99bbcc26b70b19f8ef1d9.zip
cpython-094c9c921cc889f1aac99bbcc26b70b19f8ef1d9.tar.gz
cpython-094c9c921cc889f1aac99bbcc26b70b19f8ef1d9.tar.bz2
Issue #23275: Allow () = iterable assignment syntax
Documentation updates by Martin Panter.
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Python/ast.c b/Python/ast.c
index ad771cf..1efd0b7 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -990,13 +990,8 @@ set_context(struct compiling *c, expr_ty e, expr_context_ty ctx, const node *n)
s = e->v.List.elts;
break;
case Tuple_kind:
- if (asdl_seq_LEN(e->v.Tuple.elts)) {
- e->v.Tuple.ctx = ctx;
- s = e->v.Tuple.elts;
- }
- else {
- expr_name = "()";
- }
+ e->v.Tuple.ctx = ctx;
+ s = e->v.Tuple.elts;
break;
case Lambda_kind:
expr_name = "lambda";