New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Argument Clinic docs do not list support for the 'l' format #64531
Comments
'l' is long for PyArg_ParseTuple(). |
/*[clinic input]
[clinic start generated code]*/ PyDoc_STRVAR(brett_is_stinky_and_wrong__doc__, #define BRETT_IS_STINKY_AND_WRONG_METHODDEF \
{"brett_is_stinky_and_wrong", (PyCFunction)brett_is_stinky_and_wrong, METH_VARARGS|METH_KEYWORDS, brett_is_stinky_and_wrong__doc__},
static PyObject *
brett_is_stinky_and_wrong_impl(PyModuleDef *module, long l);
static PyObject *
brett_is_stinky_and_wrong(PyModuleDef *module, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
static char *_keywords[] = {"l", NULL};
long l; if (!PyArg_ParseTupleAndKeywords(args, kwargs,
"l:brett_is_stinky_and_wrong", _keywords,
&l))
goto exit;
return_value = brett_is_stinky_and_wrong_impl(module, l); exit:
return return_value;
} static PyObject * |
So the docs don't mention this support anywhere. The 'l' format isn't listed in the table of legacy to Argument Clinic converters, nor is there a list of converters that only exist in Argument Clinic. So unless I read the section on return converters and inferred that if a return converter exists for long it exists as a argument converter I had no way of knowing the existence of long as a converter without reading the code. So this is at least a doc bug. |
See documentation patch for this issue attached to bpo-20346 (a duplicate of this). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: