@@ -1495,6 +1495,26 @@ You can still use a self converter, a return converter, and specify
14951495a *type * argument to the object converter for :c:macro: `METH_O `.
14961496
14971497
1498+ How to convert variadic arguments functions
1499+ -------------------------------------------
1500+
1501+ Some functions can be called with an arbitrary number of arguments.
1502+ These arguments will be wrapped up in a tuple.
1503+
1504+ To convert a function to accept variadic arguments,
1505+ add a ``* `` in front of the parameter name just like Python,
1506+ and the parameter should use the ``object `` converter::
1507+
1508+ /*[clinic input]
1509+ vararg_sample
1510+
1511+ foo: int
1512+ *args: object
1513+ [clinic start generated code]*/
1514+
1515+ .. versionadded :: 3.11
1516+
1517+
14981518How to convert ``tp_new `` and ``tp_init `` functions
14991519---------------------------------------------------
15001520
@@ -2213,23 +2233,3 @@ and update your unit tests to reflect the new behaviour.
22132233 If you forget to update your input block during the alpha and beta phases,
22142234 the compiler warning will turn into a compiler error when the
22152235 release candidate phase begins.
2216-
2217-
2218- How to convert variadic arguments functions
2219- -------------------------------------------
2220-
2221- Some functions can be called with an arbitrary number of arguments.
2222- These arguments will be wrapped up in a tuple.
2223-
2224- To convert a function to accept variadic arguments,
2225- add a ``* `` in front of the parameter name just like Python,
2226- and the parameter should use the ``object `` converter::
2227-
2228- /*[clinic input]
2229- vararg_sample
2230-
2231- foo: int
2232- *args: object
2233- [clinic start generated code]*/
2234-
2235- .. versionadded :: 3.11
0 commit comments