Feature or enhancement
Sub-issue of #108643.
Add a --list option which prints the modules, classes and functions which Argument Clinic defines in the specified files, each function with its signature, and writes nothing:
$ ./python Tools/clinic/clinic.py --list Modules/_collectionsmodule.c
Modules/_collectionsmodule.c
class _tuplegetter
_tuplegetter(index, doc, /)
module _collections
_collections._count_elements($module, mapping, iterable, /)
class _collections.deque
_collections.deque.rotate($self, n=1, /)
_collections.deque.index($self, value, [start, [stop]])
_collections.deque([iterable[, maxlen]])
__new__() and __init__() are shown as a call of the class. @getter and @setter have no signature, so they are shown as getter <name> and setter <name>.
It works with --make, so --list --make --srcdir . lists everything which Argument Clinic defines in the tree.
It also makes the parsed data reachable from the command line, which the remaining items of #108643 need.
Linked PRs
Feature or enhancement
Sub-issue of #108643.
Add a
--listoption which prints the modules, classes and functions which Argument Clinic defines in the specified files, each function with its signature, and writes nothing:__new__()and__init__()are shown as a call of the class.@getterand@setterhave no signature, so they are shown asgetter <name>andsetter <name>.It works with
--make, so--list --make --srcdir .lists everything which Argument Clinic defines in the tree.It also makes the parsed data reachable from the command line, which the remaining items of #108643 need.
Linked PRs