summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2019-12-12 19:10:21 -0800
committerGuido van Rossum <guido@python.org>2019-12-12 19:10:32 -0800
commit71c9293e7de6880982dadf10228ff631f2ab6013 (patch)
treee8f032e77f77693730f25535d24b56e4503626d8
parent025a602af7ee284d8db6955c26016f3f27d35536 (diff)
downloadcpython-git-fix-namedexpr-comment.tar.gz
The comment in ast_for_namedexpr shouldn't include if_stmtfix-namedexpr-comment
-rw-r--r--Python/ast.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/ast.c b/Python/ast.c
index c450b877f1..37fd919311 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1935,9 +1935,7 @@ ast_for_decorated(struct compiling *c, const node *n)
static expr_ty
ast_for_namedexpr(struct compiling *c, const node *n)
{
- /* if_stmt: 'if' namedexpr_test ':' suite ('elif' namedexpr_test ':' suite)*
- ['else' ':' suite]
- namedexpr_test: test [':=' test]
+ /* namedexpr_test: test [':=' test]
argument: ( test [comp_for] |
test ':=' test |
test '=' test |