This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: better col_offset for AST in statements like "for a,b in ..."
Type: Stage:
Components: Interpreter Core Versions: Python 2.7
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, fwierzbicki
Priority: normal Keywords: patch

Created on 2009-08-14 18:55 by fwierzbicki, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
ast.diff fwierzbicki, 2009-08-14 18:55 patch for ast.c
ast.diff fwierzbicki, 2009-08-14 20:00 Try #2 added test data to
Messages (3)
msg91566 - (view) Author: Frank Wierzbicki (fwierzbicki) * (Python committer) Date: 2009-08-14 18:55
For statements like:

for a,b in c:

The Tuple node "a,b" ends up with a col_offset of 0 (the position of the
"for"), but the col_offset should probably be 4 (the position of "a").
This is more consistent with other Tuple node col_offset results.
msg91568 - (view) Author: Frank Wierzbicki (fwierzbicki) * (Python committer) Date: 2009-08-14 20:00
Adding tests to for the three cases that exercise the "for
a,b" scenario.  Also fixed a small bug in the test code generator in
msg91624 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-08-15 22:59
Thanks for the patch! Commited in r74464.
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50953
2009-08-15 22:59:48benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg91624

resolution: accepted
2009-08-14 20:00:31fwierzbickisetfiles: + ast.diff

messages: + msg91568
2009-08-14 18:55:46fwierzbickicreate