]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
The comment in ast_for_namedexpr shouldn't include if_stmt (GH-17586) 17624/head
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 15 Dec 2019 20:04:07 +0000 (12:04 -0800)
committerGitHub <noreply@github.com>
Sun, 15 Dec 2019 20:04:07 +0000 (12:04 -0800)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit b08d3f71beab59653edfbbcf7b92a7bc8050d6b8)

Co-authored-by: Guido van Rossum <guido@python.org>
Python/ast.c

index 95caeffc8ff78e946975dfbbfab932fe644cbfc2..7081394e5844b17a27c99c63530a0ba21743e59d 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 |