]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
The comment in ast_for_namedexpr shouldn't include if_stmt (GH-17586)
authorGuido van Rossum <guido@python.org>
Sun, 15 Dec 2019 18:00:33 +0000 (10:00 -0800)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 15 Dec 2019 18:00:33 +0000 (10:00 -0800)
Automerge-Triggered-By: @gvanrossum
Python/ast.c

index 55fe58c5f39c2de7bd294b572c06e56a33bf0d15..c0d67a15a6d7ddf828dafa077386340b91463293 100644 (file)
@@ -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 |