If the only parameter of a function is in an optional group, Argument Clinic generates METH_O:
/*[clinic input]
m.f
[
a: object
]
/
[clinic start generated code]*/
#define M_F_METHODDEF \
{"f", (PyCFunction)m_f, METH_O, m_f__doc__},
static PyObject *
m_f(PyObject *module, int group_right_1, PyObject *a)
Bug report
If the only parameter of a function is in an optional group, Argument Clinic generates
METH_O:The group is ignored: the argument becomes mandatory, and
group_right_1is never computed nor passed.Linked PRs