mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #27810: Rerun Argument Clinic on all modules
This commit is contained in:
parent
f0ccbbbc57
commit
37e4ef7b17
25 changed files with 453 additions and 452 deletions
|
@ -17,13 +17,13 @@ PyDoc_STRVAR(bytes_split__doc__,
|
|||
" -1 (the default value) means no limit.");
|
||||
|
||||
#define BYTES_SPLIT_METHODDEF \
|
||||
{"split", (PyCFunction)bytes_split, METH_VARARGS|METH_KEYWORDS, bytes_split__doc__},
|
||||
{"split", (PyCFunction)bytes_split, METH_FASTCALL, bytes_split__doc__},
|
||||
|
||||
static PyObject *
|
||||
bytes_split_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
|
||||
|
||||
static PyObject *
|
||||
bytes_split(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
||||
bytes_split(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
static const char * const _keywords[] = {"sep", "maxsplit", NULL};
|
||||
|
@ -31,7 +31,7 @@ bytes_split(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *sep = Py_None;
|
||||
Py_ssize_t maxsplit = -1;
|
||||
|
||||
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
|
||||
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
||||
&sep, &maxsplit)) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -136,13 +136,13 @@ PyDoc_STRVAR(bytes_rsplit__doc__,
|
|||
"Splitting is done starting at the end of the bytes and working to the front.");
|
||||
|
||||
#define BYTES_RSPLIT_METHODDEF \
|
||||
{"rsplit", (PyCFunction)bytes_rsplit, METH_VARARGS|METH_KEYWORDS, bytes_rsplit__doc__},
|
||||
{"rsplit", (PyCFunction)bytes_rsplit, METH_FASTCALL, bytes_rsplit__doc__},
|
||||
|
||||
static PyObject *
|
||||
bytes_rsplit_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
|
||||
|
||||
static PyObject *
|
||||
bytes_rsplit(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
||||
bytes_rsplit(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
static const char * const _keywords[] = {"sep", "maxsplit", NULL};
|
||||
|
@ -150,7 +150,7 @@ bytes_rsplit(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *sep = Py_None;
|
||||
Py_ssize_t maxsplit = -1;
|
||||
|
||||
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
|
||||
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
||||
&sep, &maxsplit)) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -281,14 +281,14 @@ PyDoc_STRVAR(bytes_translate__doc__,
|
|||
"The remaining characters are mapped through the given translation table.");
|
||||
|
||||
#define BYTES_TRANSLATE_METHODDEF \
|
||||
{"translate", (PyCFunction)bytes_translate, METH_VARARGS|METH_KEYWORDS, bytes_translate__doc__},
|
||||
{"translate", (PyCFunction)bytes_translate, METH_FASTCALL, bytes_translate__doc__},
|
||||
|
||||
static PyObject *
|
||||
bytes_translate_impl(PyBytesObject *self, PyObject *table,
|
||||
PyObject *deletechars);
|
||||
|
||||
static PyObject *
|
||||
bytes_translate(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
||||
bytes_translate(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
static const char * const _keywords[] = {"", "delete", NULL};
|
||||
|
@ -296,7 +296,7 @@ bytes_translate(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *table;
|
||||
PyObject *deletechars = NULL;
|
||||
|
||||
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
|
||||
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
||||
&table, &deletechars)) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -412,14 +412,14 @@ PyDoc_STRVAR(bytes_decode__doc__,
|
|||
" can handle UnicodeDecodeErrors.");
|
||||
|
||||
#define BYTES_DECODE_METHODDEF \
|
||||
{"decode", (PyCFunction)bytes_decode, METH_VARARGS|METH_KEYWORDS, bytes_decode__doc__},
|
||||
{"decode", (PyCFunction)bytes_decode, METH_FASTCALL, bytes_decode__doc__},
|
||||
|
||||
static PyObject *
|
||||
bytes_decode_impl(PyBytesObject *self, const char *encoding,
|
||||
const char *errors);
|
||||
|
||||
static PyObject *
|
||||
bytes_decode(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
||||
bytes_decode(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
static const char * const _keywords[] = {"encoding", "errors", NULL};
|
||||
|
@ -427,7 +427,7 @@ bytes_decode(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
|||
const char *encoding = NULL;
|
||||
const char *errors = NULL;
|
||||
|
||||
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
|
||||
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
||||
&encoding, &errors)) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -447,20 +447,20 @@ PyDoc_STRVAR(bytes_splitlines__doc__,
|
|||
"true.");
|
||||
|
||||
#define BYTES_SPLITLINES_METHODDEF \
|
||||
{"splitlines", (PyCFunction)bytes_splitlines, METH_VARARGS|METH_KEYWORDS, bytes_splitlines__doc__},
|
||||
{"splitlines", (PyCFunction)bytes_splitlines, METH_FASTCALL, bytes_splitlines__doc__},
|
||||
|
||||
static PyObject *
|
||||
bytes_splitlines_impl(PyBytesObject *self, int keepends);
|
||||
|
||||
static PyObject *
|
||||
bytes_splitlines(PyBytesObject *self, PyObject *args, PyObject *kwargs)
|
||||
bytes_splitlines(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
static const char * const _keywords[] = {"keepends", NULL};
|
||||
static _PyArg_Parser _parser = {"|i:splitlines", _keywords, 0};
|
||||
int keepends = 0;
|
||||
|
||||
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
|
||||
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
||||
&keepends)) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -499,4 +499,4 @@ bytes_fromhex(PyTypeObject *type, PyObject *arg)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=5618c05c24c1e617 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=2dc3c93cfd2dc440 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue