]> granicus.if.org Git - python/commit
bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)
authorCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>
Mon, 8 Jul 2019 21:17:56 +0000 (23:17 +0200)
committerIvan Levkivskyi <levkivskyi@gmail.com>
Mon, 8 Jul 2019 21:17:56 +0000 (22:17 +0100)
commit110a47c4f42cf4db88edc1876899fff8f05190fb
treeb649c1aa3583487925f65e2c4bcec5d71bb54f24
parent66b4150f6f001640521ae6c9571cd4325cd67394
bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)

Nested BinOp instances (e.g. a+b+c) had a wrong col_offset for the
second BinOp (e.g. 2 instead of 0 in the example). Fix it by using the
correct st node to copy the line and col_offset from in ast.c.
Lib/test/test_ast.py
Misc/ACKS
Misc/NEWS.d/next/Library/2019-07-05-21-46-45.bpo-18374.qgE0H3.rst [new file with mode: 0644]
Python/ast.c