This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients SylvainDe, serhiy.storchaka
Date 2017-06-07.21:24:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496870695.34.0.930174079345.issue30592@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-06-07 21:24:55serhiy.storchakasetrecipients: + serhiy.storchaka, SylvainDe
2017-06-07 21:24:55serhiy.storchakasetmessageid: <1496870695.34.0.930174079345.issue30592@psf.upfronthosting.co.za>
2017-06-07 21:24:55serhiy.storchakalinkissue30592 messages
2017-06-07 21:24:55serhiy.storchakacreate