]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt...
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Thu, 12 Dec 2019 21:40:21 +0000 (22:40 +0100)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 12 Dec 2019 21:40:21 +0000 (13:40 -0800)
commit025a602af7ee284d8db6955c26016f3f27d35536
treef080f5fadbf276bc1dac0910c0ab9ecab81feeaa
parent1988344a6bff253f017e053f69318ecf03587294
bpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt (GH-17582)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal
Lib/test/test_ast.py
Misc/NEWS.d/next/Core and Builtins/2019-12-12-21-05-43.bpo-39031.imlCYZ.rst [new file with mode: 0644]
Python/ast.c