[issue31241] ast col_offset wrong for list comprehensions, generators and tuples

2018-11-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5, Python 3.6 ___ Python tracker

[issue31241] ast col_offset wrong for list comprehensions, generators and tuples

2018-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b619b097923155a7034c05c4018bf06af9f994d0 by Serhiy Storchaka in branch 'master': bpo-31241: Fix AST node position for list and generator comprehensions. (GH-10633)

[issue31241] ast col_offset wrong for list comprehensions, generators and tuples

2018-11-26 Thread Brett Cannon
Brett Cannon added the comment: Yeah, it's a tough call because it's one of those things others have probably worked around already, so backporting would break the work-arounds. If you don't want to bother backporting, Serhiy, I think it would be fine to not do it. --

[issue31241] ast col_offset wrong for list comprehensions, generators and tuples

2018-11-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure what parts of this PR should be backported if either. -- ___ Python tracker ___

[issue31241] ast col_offset wrong for list comprehensions, generators and tuples

2018-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For list comprehensions and generator expressions this is definitely a bug. But tuples syntax technically does not include surrounded parentheses. There is also a problem with generator expression passes as a single argument. Generator expression

[issue31241] ast col_offset wrong for list comprehensions, generators and tuples

2018-11-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +9880 stage: -> patch review ___ Python tracker ___ ___

[issue31241] ast col_offset wrong for list comprehensions, generators and tuples

2018-11-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue31241] ast col_offset wrong for list comprehensions, generators and tuples

2017-08-20 Thread Samuel Colvin
New submission from Samuel Colvin: With Python 3.5 and 3.6 list comprehensions, generators and tuples have the col_offset for their ast nodes off by 1: ``` import ast ast.parse('{a for a in range(3)}').body[0].value.col_offset >> 0 # set comprehension correct ast.parse('{a: 1 for a in