[New-bugs-announce] [issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call

STINNER Victor report at bugs.python.org
Fri May 24 06:29:45 EDT 2019


New submission from STINNER Victor <vstinner at redhat.com>:

Example of generated code:

    if (!PyBytes_Check(args[15])) {
        _PyArg_BadArgument("replace", 16, "bytes", args[15]);
        goto exit;
    }

Error message:

TypeError: replace() argument 16 must be bytes, not tuple

It is the 'lnotab' parameter which is a keywoard-only parameter. I expect the parameter name in the error message.

Note: I got this error while implementing bpo-37032.

----------
components: Interpreter Core
messages: 343365
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37034>
_______________________________________


More information about the New-bugs-announce mailing list