$_{type}$The C type to use for this variable. $_{type}$should be a Python string specifying the type, e.g. $_{int}$. If this is a pointer type, the type string should end with ' *' . $_{default}$The Python default value for this parameter, as a Python value. Or the magic value$_{unspecified}$ if there is no default. py_default default as it should appear in Python code, as a string. Or None if there is no default. c_default default as it should appear in C code, as a string. Or None if there is no default. c_ignored_default The default value used to initialize the C variable when there is no default, but not spec- ifying a default may result in an “uninitialized variable” warning. This can easily happen when using option groups—although properly-written code will never actually use this value, the variable does get passed in to the impl, and the C compiler will complain about the “use” of the uninitialized value. This value should always be a non-empty string. $_{converter}$The name of the C converter function, as a string. impl_by_reference A boolean value. If true, Argument Clinic will add a & in front of the name of the variable when passing it into the impl function. parse_by_reference A boolean value. If true, Argument Clinic will add a $_{&}$in front of the name of the variable when passing it into$_{PyArg_ParseTuple()}$ . Here’s the simplest example of a custom converter, from Modules/zlibmodule.c : /*[python input] class ssize_t_converter(CConverter): type = 'Py_ssize_t' converter = 'ssize_t_converter' [python start generated code]*/ /*[python end generated code: output=da39a3ee5e6b4b0d This block adds a converter to Argument Clinic named$_{ssize_t}$. Parameters declared as$_{ssize_t}$ will be declared as type$_{Py_ssize_t}$, and will be parsed by the$_{'O&'}$ format unit, which will call the$_{ssize_t_converter}$ converter function. $_{ssize_t}$variables automatically support default values. More sophisticated custom converters can insert custom C code to handle initialization and cleanup. You can see more examples of custom converters in the CPython source tree; grep the C files for the string$_{CConverter}$. Writing a custom return converter is much like writing a custom converter. Except it’s somewhat simpler, because return converters are themselves much simpler. Return converters must subclass$_{CReturnConverter}$. There are no examples yet of custom return converters, because they are not widely used yet. If you wish to write your own return converter, please read$_{Tools/clinic/}$ clinic.py , specifically the implementation of$_{CReturnConverter}$and all its subclasses. To convert a function using$_{METH_O}$ , make sure the function’s single argument is using the$_{object}$converter, and mark the arguments as positional-only: 18 /*[clinic input] meth_o_sample argument: object / [clinic start generated code]*/ 4.17 METH_O and METH_NOARGS 4.16 Writing a custom return converter