[New-bugs-announce] [issue40726] ast.Call end_lineno is defined and returns None

gaborbernat report at bugs.python.org
Fri May 22 04:34:59 EDT 2020


New submission from gaborbernat <gaborjbernat at gmail.com>:

Reporting an issue from https://github.com/xonsh/xonsh/issues/3581; boils down to, ast.Call used to not define end_lineno in 3.8:

py -3.8 -c 'import ast; type(ast.Call().end_lineno)'                                                                                                                                                                 Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'Call' object has no attribute 'end_lineno'

However in 3.9 is defined with None:

py -3.9 -c 'import ast; type(ast.Call().end_lineno)'

This messes with some other operations in ast, namely https://github.com/python/cpython/blob/master/Lib/ast.py#L233

----------
messages: 369567
nosy: gaborbernat
priority: normal
severity: normal
status: open
title: ast.Call end_lineno is defined and returns None
versions: Python 3.9

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


More information about the New-bugs-announce mailing list