[New-bugs-announce] [issue44063] compiler: does not revert back the end_* locations
Batuhan Taskaya
report at bugs.python.org
Thu May 6 15:34:13 EDT 2021
New submission from Batuhan Taskaya <isidentical at gmail.com>:
Something that I've stumbled up while working on another patch is that, the compiler doesn't revert the end_lineno and the end_col_offset attributes back unlike regular lineno/col_offset. An example of this problem;
ar rcs libpython3.10d.a Modules/getbuildinfo.o Parser/token.o Parser/pegen.o Parser/parser.o Parser/string_parser.o Parser/peg_api.(.venv38) (Python 3.8.5+) [ 10:33ÖS ] [ isidentical at desktop:~/cpython/cpython(main✔) ]
$ cat t3.py
def foo(a):
pass
foo(
a=1,
a=2
)
$ ./python t3.py
File "/home/isidentical/cpython/cpython/t3.py", line 4
foo(
^
SyntaxError: keyword argument repeated: a
with the fix
$ ./python t3.py
File "/home/isidentical/cpython/cpython/t3.py", line 6
a=2
^^^
SyntaxError: keyword argument repeated: a
----------
messages: 393138
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: compiler: does not revert back the end_* locations
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44063>
_______________________________________
More information about the New-bugs-announce
mailing list