Skip to content

self_converter used in a METH_O function doesn't support unused parameter #136654

@picnixz

Description

@picnixz

Bug report

Bug description:

This is something that I found when reading __builtins__.id:

/* AC: gdb's integration with CPython relies on builtin_id having
 * the *exact* parameter names of "self" and "v", so we ensure we
 * preserve those name rather than using the AC defaults.
 */
/*[clinic input]
id as builtin_id

    self: self(type="PyModuleDef *")
    obj as v: object
    /

I wanted to add unused=True but the signature doesn't change (namely, we still have self instead of Py_UNUSED(self)).

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedtopic-argument-clinictype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions