Serhiy Storchaka added the comment:
Thank you for catching this bug SylvainDe. This is a regression caused by
issue30534. I added "()" after the function name for unifying with other error
messages but missed that _PyArg_NoKeywords() often is called with argument
containing "()", e.g. _PyArg_NoKeywords("bool()", kwds).
There are two ways to solve this issue:
1. Remove "()" from all calls of _PyArg_NoKeywords(), _PyArg_NoStackKeywords()
and _PyArg_NoPositional() and let these functions to add "()" automatically.
This will change almost all manually calls of _PyArg_NoKeywords(). And may be
in some cases "()" shouldn't be added.
2. Make _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and _PyArg_NoPositional()
not adding "()" automatically, but always pass a name with "()" if it is
needed. Argument Clinic should be changed to add "()" in arguments of these
functions. This is large patch, but mostly generated.
I don't know what the way is better.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30592>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com