[issue46042] Error range of "duplicate argument" SyntaxErrors is too big
Carl Friedrich Bolz-Tereick
report at bugs.python.org
Fri Dec 10 16:24:21 EST 2021
New submission from Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>:
The error range for the "duplicate argument in function definition" SyntaxError is too large:
$ cat x.py
def f(a, b, c, d, e, f, g, a): pass
$ python x.py
File "/home/cfbolz/projects/cpython/x.py", line 1
def f(a, b, c, d, e, f, g, a): pass
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: duplicate argument 'a' in function definition
I would expect only the second 'a' to be underlined.
I can try to fix this.
----------
messages: 408248
nosy: Carl.Friedrich.Bolz, pablogsal
priority: normal
severity: normal
status: open
title: Error range of "duplicate argument" SyntaxErrors is too big
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46042>
_______________________________________
More information about the Python-bugs-list
mailing list