diff --git a/development-tools/clinic/howto.rst b/development-tools/clinic/howto.rst index 43e8c20e8..1addc1a31 100644 --- a/development-tools/clinic/howto.rst +++ b/development-tools/clinic/howto.rst @@ -875,6 +875,19 @@ Just name them ``__new__`` or ``__init__`` as appropriate. Notes: (If your function doesn't support keywords, the parsing function generated will throw an exception if it receives any.) +* :ref:`vectorcall protocol ` support can be added using the + ``@vectorcall`` directive. This will output an additional function that can be + used in the :c:member:`~PyTypeObject.tp_vectorcall` slot. + The generated function adds a fair amount of code, so benchmark first + and only use it where it gives a significant speedup. + + Current restrictions: + + * Optional groups are not supported. + * The type must be immutable (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`). + + .. versionadded:: 3.16 + How to change and redirect Clinic's output ------------------------------------------