[New-bugs-announce] [issue40779] incorrect end column for single argument generator function call AST

Tomasz Pytel report at bugs.python.org
Tue May 26 10:06:10 EDT 2020


New submission from Tomasz Pytel <tompytel at gmail.com>:

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

----------
components: Interpreter Core
messages: 369982
nosy: Tomasz Pytel
priority: normal
severity: normal
status: open
title: incorrect end column for single argument generator function call AST
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40779>
_______________________________________


More information about the New-bugs-announce mailing list