Skip to content

Argument Clinic: list the converters defined in a C file #155212

Description

@serhiy-storchaka

Feature or enhancement

--converters prints only the built-in converters and refuses to accept a file name:

$ ./python Tools/clinic/clinic.py --converters Modules/posixmodule.c
clinic.py: error: can't specify --converters and a filename at the same time

But 23 files in the tree define their own converters in [python input] blocks -- path_t, dir_fd, uid_t and others in Modules/posixmodule.c, for example -- and there is no way to get their list and their parameters.

They are registered in the same registry as the built-in ones, so it is only a matter of parsing the given files before printing the list. This is one of the ideas listed in #108643.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions