Raymond Hettinger <[email protected]> added the comment:
I recommend leaving the code as-is. AFAICT, the situation almost never arises
in practice, and if it did, the existing SyntaxError is clear.
Given that the rest of that language uses a SyntaxError, there isn't a net
benefit for switching to TypeError:
>>> def f(µ=1, μ=2):
pass
SyntaxError: duplicate argument 'μ' in function definition
>>> def f(**kwds):
return kwds
>>> f(µ=1, μ=2)
SyntaxError: keyword argument repeated
----------
nosy: +rhettinger
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33881>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com