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: incorrect end column for single argument generator function call AST
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.8
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, Tomasz Pytel
Priority: normal Keywords:

Created on 2020-05-26 14:06 by Tomasz Pytel, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg369982 - (view) Author: Tomasz Pytel (Tomasz Pytel) Date: 2020-05-26 14:06
When calling a function with a single argument which is an unparenthesized generator expression the end column for the AST node is incorrect, it is one greater than the start of the function call parentheses where I assume it should be one past the closing parentheses.

This call:

func(i for i in range(3))

Generates the following node for the generator expression (line:col_offset -> end_line:end_col_offset):

<_ast.GeneratorExp object at 0x7f3ba61f78c0> .. 1:4 -> 1:5
msg369985 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2020-05-26 14:22
What version are you using, 3.8?
msg369986 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2020-05-26 14:23
For more context, see also bpo-39235.
msg369988 - (view) Author: Tomasz Pytel (Tomasz Pytel) Date: 2020-05-26 14:51
I am on 3.8.1 and you are right this is the same as #39235 so please disregard.
Date User Action Args
2022-04-11 14:59:31adminsetgithub: 84956
2020-05-27 00:58:19pablogsalsetstatus: open -> closed
resolution: duplicate
stage: resolved
2020-05-26 14:51:01Tomasz Pytelsetmessages: + msg369988
2020-05-26 14:23:05BTaskayasetmessages: + msg369986
2020-05-26 14:22:42BTaskayasetmessages: + msg369985
2020-05-26 14:11:05BTaskayasetnosy: + BTaskaya
2020-05-26 14:06:10Tomasz Pytelcreate