summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-03-14 08:32:22 (GMT)
committerGitHub <noreply@github.com>2019-03-14 08:32:22 (GMT)
commit3191391515824fa7f3c573d807f1034c6a28fab3 (patch)
treeff8213b07b206de4df88dc352ee957ce68f0f2de /Lib
parent2c0d3f454705bb5ccf5f6189f3cf77bbae4f056b (diff)
downloadcpython-3191391515824fa7f3c573d807f1034c6a28fab3.zip
cpython-3191391515824fa7f3c573d807f1034c6a28fab3.tar.gz
cpython-3191391515824fa7f3c573d807f1034c6a28fab3.tar.bz2
bpo-36127: Argument Clinic: inline parsing code for keyword parameters. (GH-12058)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/clinic.test1263
1 files changed, 1263 insertions, 0 deletions
diff --git a/Lib/test/clinic.test b/Lib/test/clinic.test
index b8f2331..62c2f00 100644
--- a/Lib/test/clinic.test
+++ b/Lib/test/clinic.test
@@ -3,6 +3,7 @@ output preset block
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=3c81ac2402d06a8b]*/
+
/*[clinic input]
test_object_converter
@@ -59,6 +60,7 @@ test_object_converter_impl(PyObject *module, PyObject *a, PyObject *b,
PyObject *c, PyUnicode_Object *d)
/*[clinic end generated code: output=f2c26174b3d46e94 input=005e6a8a711a869b]*/
+
/*[clinic input]
test_object_converter_one_arg
@@ -79,6 +81,7 @@ static PyObject *
test_object_converter_one_arg(PyObject *module, PyObject *a)
/*[clinic end generated code: output=6da755f8502139df input=d635d92a421f1ca3]*/
+
/*[clinic input]
test_objects_converter
@@ -125,6 +128,7 @@ static PyObject *
test_objects_converter_impl(PyObject *module, PyObject *a, PyObject *b)
/*[clinic end generated code: output=58009c0e42b4834e input=4cbb3d9edd2a36f3]*/
+
/*[clinic input]
test_object_converter_subclass_of
@@ -238,6 +242,7 @@ test_object_converter_subclass_of_impl(PyObject *module, PyObject *a,
PyObject *h, PyObject *i, PyObject *j)
/*[clinic end generated code: output=99691bda8eeda6d6 input=31b06b772d5f983e]*/
+
/*[clinic input]
test_PyBytesObject_converter
@@ -278,6 +283,7 @@ static PyObject *
test_PyBytesObject_converter_impl(PyObject *module, PyBytesObject *a)
/*[clinic end generated code: output=5d9a301c1df24eb5 input=12b10c7cb5750400]*/
+
/*[clinic input]
test_PyByteArrayObject_converter
@@ -318,6 +324,7 @@ static PyObject *
test_PyByteArrayObject_converter_impl(PyObject *module, PyByteArrayObject *a)
/*[clinic end generated code: output=9455d06f4f09637b input=5a657da535d194ae]*/
+
/*[clinic input]
test_unicode_converter
@@ -361,6 +368,7 @@ static PyObject *
test_unicode_converter_impl(PyObject *module, PyObject *a)
/*[clinic end generated code: output=9275c04fe204f4c5 input=aa33612df92aa9c5]*/
+
/*[clinic input]
test_bool_converter
@@ -430,6 +438,7 @@ static PyObject *
test_bool_converter_impl(PyObject *module, int a, int b, int c)
/*[clinic end generated code: output=25f20963894256a1 input=939854fa9f248c60]*/
+
/*[clinic input]
test_char_converter
@@ -683,6 +692,7 @@ test_char_converter_impl(PyObject *module, char a, char b, char c, char d,
char k, char l, char m, char n)
/*[clinic end generated code: output=e041d687555e0a5d input=e42330417a44feac]*/
+
/*[clinic input]
test_unsigned_char_converter
@@ -799,6 +809,7 @@ test_unsigned_char_converter_impl(PyObject *module, unsigned char a,
unsigned char b, unsigned char c)
/*[clinic end generated code: output=ebf905c5c9414762 input=021414060993e289]*/
+
/*[clinic input]
test_short_converter
@@ -865,6 +876,7 @@ static PyObject *
test_short_converter_impl(PyObject *module, short a)
/*[clinic end generated code: output=86fe1a1496a7ff20 input=6a8a7a509a498ff4]*/
+
/*[clinic input]
test_unsigned_short_converter
@@ -934,6 +946,7 @@ test_unsigned_short_converter_impl(PyObject *module, unsigned short a,
unsigned short b, unsigned short c)
/*[clinic end generated code: output=3779fe104319e3ae input=cdfd8eff3d9176b4]*/
+
/*[clinic input]
test_int_converter
@@ -1030,6 +1043,7 @@ static PyObject *
test_int_converter_impl(PyObject *module, int a, int b, int c, myenum d)
/*[clinic end generated code: output=de74e24e85a669a5 input=d20541fc1ca0553e]*/
+
/*[clinic input]
test_unsigned_int_converter
@@ -1099,6 +1113,7 @@ test_unsigned_int_converter_impl(PyObject *module, unsigned int a,
unsigned int b, unsigned int c)
/*[clinic end generated code: output=189176ce67c7d2e7 input=5533534828b62fc0]*/
+
/*[clinic input]
test_long_converter
@@ -1150,6 +1165,7 @@ static PyObject *
test_long_converter_impl(PyObject *module, long a)
/*[clinic end generated code: output=44cd8823f59d116b input=d2179e3c9cdcde89]*/
+
/*[clinic input]
test_unsigned_long_converter
@@ -1215,6 +1231,7 @@ test_unsigned_long_converter_impl(PyObject *module, unsigned long a,
unsigned long b, unsigned long c)
/*[clinic end generated code: output=1c05c871c0309e08 input=f450d94cae1ef73b]*/
+
/*[clinic input]
test_long_long_converter
@@ -1266,6 +1283,7 @@ static PyObject *
test_long_long_converter_impl(PyObject *module, long long a)
/*[clinic end generated code: output=3e8083f3aee4f18a input=d5fc81577ff4dd02]*/
+
/*[clinic input]
test_unsigned_long_long_converter
@@ -1335,6 +1353,7 @@ test_unsigned_long_long_converter_impl(PyObject *module,
unsigned long long c)
/*[clinic end generated code: output=0a9b17fb824e28eb input=a15115dc41866ff4]*/
+
/*[clinic input]
test_Py_ssize_t_converter
@@ -1426,6 +1445,7 @@ test_Py_ssize_t_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
Py_ssize_t c)
/*[clinic end generated code: output=a46d2aaf40c10398 input=3855f184bb3f299d]*/
+
/*[clinic input]
test_slice_index_converter
@@ -1489,6 +1509,7 @@ test_slice_index_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
Py_ssize_t c)
/*[clinic end generated code: output=2148703cd3c6e941 input=edeadb0ee126f531]*/
+
/*[clinic input]
test_size_t_converter
@@ -1534,6 +1555,7 @@ static PyObject *
test_size_t_converter_impl(PyObject *module, size_t a)
/*[clinic end generated code: output=8a91a9ca8a92dabb input=52e93a0fed0f1fb3]*/
+
/*[clinic input]
test_float_converter
@@ -1580,6 +1602,7 @@ static PyObject *
test_float_converter_impl(PyObject *module, float a)
/*[clinic end generated code: output=8293566b2ec1fc52 input=259c0d98eca35034]*/
+
/*[clinic input]
test_double_converter
@@ -1626,6 +1649,7 @@ static PyObject *
test_double_converter_impl(PyObject *module, double a)
/*[clinic end generated code: output=487081a9b8da67ab input=c6a9945706a41c27]*/
+
/*[clinic input]
test_Py_complex_converter
@@ -1665,6 +1689,7 @@ static PyObject *
test_Py_complex_converter_impl(PyObject *module, Py_complex a)
/*[clinic end generated code: output=c2ecbec2144ca540 input=070f216a515beb79]*/
+
/*[clinic input]
test_str_converter
@@ -1730,6 +1755,7 @@ test_str_converter_impl(PyObject *module, const char *a, const char *b,
const char *h, Py_ssize_clean_t h_length)
/*[clinic end generated code: output=8415d82c56154307 input=8afe9da8185cd38c]*/
+
/*[clinic input]
test_str_converter_encoding
@@ -1804,6 +1830,7 @@ test_str_converter_encoding_impl(PyObject *module, char *a, char *b, char *c,
Py_ssize_clean_t e_length)
/*[clinic end generated code: output=f579dd9e795a364e input=eb4c38e1f898f402]*/
+
/*[clinic input]
test_Py_UNICODE_converter
@@ -1863,6 +1890,7 @@ test_Py_UNICODE_converter_impl(PyObject *module, const Py_UNICODE *a,
Py_ssize_clean_t e_length)
/*[clinic end generated code: output=dd0a09a1b772e57b input=064a3b68ad7f04b0]*/
+
/*[clinic input]
test_Py_buffer_converter
@@ -1932,3 +1960,1238 @@ static PyObject *
test_Py_buffer_converter_impl(PyObject *module, Py_buffer *a, Py_buffer *b,
Py_buffer *c, Py_buffer *d, Py_buffer *e)
/*[clinic end generated code: output=5760c82faa2ed61f input=6a9da0f56f9525fd]*/
+
+
+/*[clinic input]
+test_keywords
+
+ a: object
+ b: object
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_keywords__doc__,
+"test_keywords($module, /, a, b)\n"
+"--\n"
+"\n");
+
+#define TEST_KEYWORDS_METHODDEF \
+ {"test_keywords", (PyCFunction)(void(*)(void))test_keywords, METH_FASTCALL|METH_KEYWORDS, test_keywords__doc__},
+
+static PyObject *
+test_keywords_impl(PyObject *module, PyObject *a, PyObject *b);
+
+static PyObject *
+test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"a", "b", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords", 0};
+ PyObject *argsbuf[2];
+ PyObject *a;
+ PyObject *b;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ return_value = test_keywords_impl(module, a, b);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_keywords_impl(PyObject *module, PyObject *a, PyObject *b)
+/*[clinic end generated code: output=4be6cf045ea8242e input=0d3484844749c05b]*/
+
+
+/*[clinic input]
+test_keywords_kwonly
+
+ a: object
+ *
+ b: object
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_keywords_kwonly__doc__,
+"test_keywords_kwonly($module, /, a, *, b)\n"
+"--\n"
+"\n");
+
+#define TEST_KEYWORDS_KWONLY_METHODDEF \
+ {"test_keywords_kwonly", (PyCFunction)(void(*)(void))test_keywords_kwonly, METH_FASTCALL|METH_KEYWORDS, test_keywords_kwonly__doc__},
+
+static PyObject *
+test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b);
+
+static PyObject *
+test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"a", "b", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_kwonly", 0};
+ PyObject *argsbuf[2];
+ PyObject *a;
+ PyObject *b;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ return_value = test_keywords_kwonly_impl(module, a, b);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b)
+/*[clinic end generated code: output=d63c4977a7a80713 input=384adc78bfa0bff7]*/
+
+
+/*[clinic input]
+test_keywords_opt
+
+ a: object
+ b: object = None
+ c: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_keywords_opt__doc__,
+"test_keywords_opt($module, /, a, b=None, c=None)\n"
+"--\n"
+"\n");
+
+#define TEST_KEYWORDS_OPT_METHODDEF \
+ {"test_keywords_opt", (PyCFunction)(void(*)(void))test_keywords_opt, METH_FASTCALL|METH_KEYWORDS, test_keywords_opt__doc__},
+
+static PyObject *
+test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c);
+
+static PyObject *
+test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"a", "b", "c", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_opt", 0};
+ PyObject *argsbuf[3];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[1]) {
+ b = args[1];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+ c = args[2];
+skip_optional_pos:
+ return_value = test_keywords_opt_impl(module, a, b, c);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c)
+/*[clinic end generated code: output=e5e50d114d8fc10a input=eda7964f784f4607]*/
+
+
+/*[clinic input]
+test_keywords_opt_kwonly
+
+ a: object
+ b: object = None
+ *
+ c: object = None
+ d: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_keywords_opt_kwonly__doc__,
+"test_keywords_opt_kwonly($module, /, a, b=None, *, c=None, d=None)\n"
+"--\n"
+"\n");
+
+#define TEST_KEYWORDS_OPT_KWONLY_METHODDEF \
+ {"test_keywords_opt_kwonly", (PyCFunction)(void(*)(void))test_keywords_opt_kwonly, METH_FASTCALL|METH_KEYWORDS, test_keywords_opt_kwonly__doc__},
+
+static PyObject *
+test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c, PyObject *d);
+
+static PyObject *
+test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"a", "b", "c", "d", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_opt_kwonly", 0};
+ PyObject *argsbuf[4];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[1]) {
+ b = args[1];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+skip_optional_pos:
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ d = args[3];
+skip_optional_kwonly:
+ return_value = test_keywords_opt_kwonly_impl(module, a, b, c, d);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c, PyObject *d)
+/*[clinic end generated code: output=3f065cb8309b9317 input=209387a4815e5082]*/
+
+
+/*[clinic input]
+test_keywords_kwonly_opt
+
+ a: object
+ *
+ b: object = None
+ c: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_keywords_kwonly_opt__doc__,
+"test_keywords_kwonly_opt($module, /, a, *, b=None, c=None)\n"
+"--\n"
+"\n");
+
+#define TEST_KEYWORDS_KWONLY_OPT_METHODDEF \
+ {"test_keywords_kwonly_opt", (PyCFunction)(void(*)(void))test_keywords_kwonly_opt, METH_FASTCALL|METH_KEYWORDS, test_keywords_kwonly_opt__doc__},
+
+static PyObject *
+test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c);
+
+static PyObject *
+test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"a", "b", "c", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_kwonly_opt", 0};
+ PyObject *argsbuf[3];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[1]) {
+ b = args[1];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ c = args[2];
+skip_optional_kwonly:
+ return_value = test_keywords_kwonly_opt_impl(module, a, b, c);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c)
+/*[clinic end generated code: output=94edba5484e1681e input=18393cc64fa000f4]*/
+
+
+/*[clinic input]
+test_posonly_keywords
+
+ a: object
+ /
+ b: object
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_keywords__doc__,
+"test_posonly_keywords($module, a, /, b)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KEYWORDS_METHODDEF \
+ {"test_posonly_keywords", (PyCFunction)(void(*)(void))test_posonly_keywords, METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords__doc__},
+
+static PyObject *
+test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b);
+
+static PyObject *
+test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords", 0};
+ PyObject *argsbuf[2];
+ PyObject *a;
+ PyObject *b;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ return_value = test_posonly_keywords_impl(module, a, b);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b)
+/*[clinic end generated code: output=eca1507f0182ffb0 input=1767b0ebdf06060e]*/
+
+
+/*[clinic input]
+test_posonly_kwonly
+
+ a: object
+ /
+ *
+ c: object
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_kwonly__doc__,
+"test_posonly_kwonly($module, a, /, *, c)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KWONLY_METHODDEF \
+ {"test_posonly_kwonly", (PyCFunction)(void(*)(void))test_posonly_kwonly, METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly__doc__},
+
+static PyObject *
+test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c);
+
+static PyObject *
+test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "c", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly", 0};
+ PyObject *argsbuf[2];
+ PyObject *a;
+ PyObject *c;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ c = args[1];
+ return_value = test_posonly_kwonly_impl(module, a, c);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c)
+/*[clinic end generated code: output=3e14655646b66e9a input=9042f2818f664839]*/
+
+
+/*[clinic input]
+test_posonly_keywords_kwonly
+
+ a: object
+ /
+ b: object
+ *
+ c: object
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_keywords_kwonly__doc__,
+"test_posonly_keywords_kwonly($module, a, /, b, *, c)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KEYWORDS_KWONLY_METHODDEF \
+ {"test_posonly_keywords_kwonly", (PyCFunction)(void(*)(void))test_posonly_keywords_kwonly, METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly__doc__},
+
+static PyObject *
+test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c);
+
+static PyObject *
+test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly", 0};
+ PyObject *argsbuf[3];
+ PyObject *a;
+ PyObject *b;
+ PyObject *c;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ c = args[2];
+ return_value = test_posonly_keywords_kwonly_impl(module, a, b, c);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c)
+/*[clinic end generated code: output=de57172fc97a626e input=29546ebdca492fea]*/
+
+
+/*[clinic input]
+test_posonly_keywords_opt
+
+ a: object
+ /
+ b: object
+ c: object = None
+ d: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_keywords_opt__doc__,
+"test_posonly_keywords_opt($module, a, /, b, c=None, d=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KEYWORDS_OPT_METHODDEF \
+ {"test_posonly_keywords_opt", (PyCFunction)(void(*)(void))test_posonly_keywords_opt, METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt__doc__},
+
+static PyObject *
+test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c, PyObject *d);
+
+static PyObject *
+test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", "d", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt", 0};
+ PyObject *argsbuf[4];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
+ PyObject *a;
+ PyObject *b;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+ d = args[3];
+skip_optional_pos:
+ return_value = test_posonly_keywords_opt_impl(module, a, b, c, d);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c, PyObject *d)
+/*[clinic end generated code: output=8bc6b44a25d4b716 input=cdf5a9625e554e9b]*/
+
+
+/*[clinic input]
+test_posonly_keywords_opt2
+
+ a: object
+ /
+ b: object = None
+ c: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_keywords_opt2__doc__,
+"test_posonly_keywords_opt2($module, a, /, b=None, c=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KEYWORDS_OPT2_METHODDEF \
+ {"test_posonly_keywords_opt2", (PyCFunction)(void(*)(void))test_posonly_keywords_opt2, METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt2__doc__},
+
+static PyObject *
+test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c);
+
+static PyObject *
+test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt2", 0};
+ PyObject *argsbuf[3];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[1]) {
+ b = args[1];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+ c = args[2];
+skip_optional_pos:
+ return_value = test_posonly_keywords_opt2_impl(module, a, b, c);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c)
+/*[clinic end generated code: output=a870c45a6510ba91 input=1581299d21d16f14]*/
+
+
+/*[clinic input]
+test_posonly_opt_keywords_opt
+
+ a: object
+ b: object = None
+ /
+ c: object = None
+ d: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_opt_keywords_opt__doc__,
+"test_posonly_opt_keywords_opt($module, a, b=None, /, c=None, d=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_OPT_KEYWORDS_OPT_METHODDEF \
+ {"test_posonly_opt_keywords_opt", (PyCFunction)(void(*)(void))test_posonly_opt_keywords_opt, METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_keywords_opt__doc__},
+
+static PyObject *
+test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c, PyObject *d);
+
+static PyObject *
+test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "", "c", "d", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_keywords_opt", 0};
+ PyObject *argsbuf[4];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (nargs < 2) {
+ goto skip_optional_posonly;
+ }
+ noptargs--;
+ b = args[1];
+skip_optional_posonly:
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+ d = args[3];
+skip_optional_pos:
+ return_value = test_posonly_opt_keywords_opt_impl(module, a, b, c, d);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c, PyObject *d)
+/*[clinic end generated code: output=9ae3d52e071d3b7f input=408798ec3d42949f]*/
+
+
+/*[clinic input]
+test_posonly_kwonly_opt
+
+ a: object
+ /
+ *
+ b: object
+ c: object = None
+ d: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_kwonly_opt__doc__,
+"test_posonly_kwonly_opt($module, a, /, *, b, c=None, d=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KWONLY_OPT_METHODDEF \
+ {"test_posonly_kwonly_opt", (PyCFunction)(void(*)(void))test_posonly_kwonly_opt, METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly_opt__doc__},
+
+static PyObject *
+test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c, PyObject *d);
+
+static PyObject *
+test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", "d", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly_opt", 0};
+ PyObject *argsbuf[4];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
+ PyObject *a;
+ PyObject *b;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ d = args[3];
+skip_optional_kwonly:
+ return_value = test_posonly_kwonly_opt_impl(module, a, b, c, d);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c, PyObject *d)
+/*[clinic end generated code: output=fb001f586ba68549 input=8d8e5643bbbc2309]*/
+
+
+/*[clinic input]
+test_posonly_kwonly_opt2
+
+ a: object
+ /
+ *
+ b: object = None
+ c: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_kwonly_opt2__doc__,
+"test_posonly_kwonly_opt2($module, a, /, *, b=None, c=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KWONLY_OPT2_METHODDEF \
+ {"test_posonly_kwonly_opt2", (PyCFunction)(void(*)(void))test_posonly_kwonly_opt2, METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly_opt2__doc__},
+
+static PyObject *
+test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c);
+
+static PyObject *
+test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly_opt2", 0};
+ PyObject *argsbuf[3];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[1]) {
+ b = args[1];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ c = args[2];
+skip_optional_kwonly:
+ return_value = test_posonly_kwonly_opt2_impl(module, a, b, c);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c)
+/*[clinic end generated code: output=51aae7cac77b458a input=f7e5eed94f75fff0]*/
+
+
+/*[clinic input]
+test_posonly_opt_kwonly_opt
+
+ a: object
+ b: object = None
+ /
+ *
+ c: object = None
+ d: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_opt_kwonly_opt__doc__,
+"test_posonly_opt_kwonly_opt($module, a, b=None, /, *, c=None, d=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_OPT_KWONLY_OPT_METHODDEF \
+ {"test_posonly_opt_kwonly_opt", (PyCFunction)(void(*)(void))test_posonly_opt_kwonly_opt, METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_kwonly_opt__doc__},
+
+static PyObject *
+test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c, PyObject *d);
+
+static PyObject *
+test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "", "c", "d", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_kwonly_opt", 0};
+ PyObject *argsbuf[4];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (nargs < 2) {
+ goto skip_optional_posonly;
+ }
+ noptargs--;
+ b = args[1];
+skip_optional_posonly:
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ d = args[3];
+skip_optional_kwonly:
+ return_value = test_posonly_opt_kwonly_opt_impl(module, a, b, c, d);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
+ PyObject *c, PyObject *d)
+/*[clinic end generated code: output=68844c45143d1668 input=1e557dc979d120fd]*/
+
+
+/*[clinic input]
+test_posonly_keywords_kwonly_opt
+
+ a: object
+ /
+ b: object
+ *
+ c: object
+ d: object = None
+ e: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_keywords_kwonly_opt__doc__,
+"test_posonly_keywords_kwonly_opt($module, a, /, b, *, c, d=None, e=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KEYWORDS_KWONLY_OPT_METHODDEF \
+ {"test_posonly_keywords_kwonly_opt", (PyCFunction)(void(*)(void))test_posonly_keywords_kwonly_opt, METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly_opt__doc__},
+
+static PyObject *
+test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c, PyObject *d,
+ PyObject *e);
+
+static PyObject *
+test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly_opt", 0};
+ PyObject *argsbuf[5];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 3;
+ PyObject *a;
+ PyObject *b;
+ PyObject *c;
+ PyObject *d = Py_None;
+ PyObject *e = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ c = args[2];
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[3]) {
+ d = args[3];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ e = args[4];
+skip_optional_kwonly:
+ return_value = test_posonly_keywords_kwonly_opt_impl(module, a, b, c, d, e);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c, PyObject *d,
+ PyObject *e)
+/*[clinic end generated code: output=996ff645551897ac input=c3884a4f956fdc89]*/
+
+
+/*[clinic input]
+test_posonly_keywords_kwonly_opt2
+
+ a: object
+ /
+ b: object
+ *
+ c: object = None
+ d: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_keywords_kwonly_opt2__doc__,
+"test_posonly_keywords_kwonly_opt2($module, a, /, b, *, c=None, d=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KEYWORDS_KWONLY_OPT2_METHODDEF \
+ {"test_posonly_keywords_kwonly_opt2", (PyCFunction)(void(*)(void))test_posonly_keywords_kwonly_opt2, METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly_opt2__doc__},
+
+static PyObject *
+test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c, PyObject *d);
+
+static PyObject *
+test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", "d", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly_opt2", 0};
+ PyObject *argsbuf[4];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
+ PyObject *a;
+ PyObject *b;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ d = args[3];
+skip_optional_kwonly:
+ return_value = test_posonly_keywords_kwonly_opt2_impl(module, a, b, c, d);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c, PyObject *d)
+/*[clinic end generated code: output=e5a3e992fd4b28b3 input=68d01d7c0f6dafb0]*/
+
+
+/*[clinic input]
+test_posonly_keywords_opt_kwonly_opt
+
+ a: object
+ /
+ b: object
+ c: object = None
+ *
+ d: object = None
+ e: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_keywords_opt_kwonly_opt__doc__,
+"test_posonly_keywords_opt_kwonly_opt($module, a, /, b, c=None, *,\n"
+" d=None, e=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KEYWORDS_OPT_KWONLY_OPT_METHODDEF \
+ {"test_posonly_keywords_opt_kwonly_opt", (PyCFunction)(void(*)(void))test_posonly_keywords_opt_kwonly_opt, METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt_kwonly_opt__doc__},
+
+static PyObject *
+test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c,
+ PyObject *d, PyObject *e);
+
+static PyObject *
+test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt_kwonly_opt", 0};
+ PyObject *argsbuf[5];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
+ PyObject *a;
+ PyObject *b;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+ PyObject *e = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ b = args[1];
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+skip_optional_pos:
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[3]) {
+ d = args[3];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ e = args[4];
+skip_optional_kwonly:
+ return_value = test_posonly_keywords_opt_kwonly_opt_impl(module, a, b, c, d, e);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c,
+ PyObject *d, PyObject *e)
+/*[clinic end generated code: output=ff9fb6c3d2cbbaa4 input=d0883d45876f186c]*/
+
+
+/*[clinic input]
+test_posonly_keywords_opt2_kwonly_opt
+
+ a: object
+ /
+ b: object = None
+ c: object = None
+ *
+ d: object = None
+ e: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_keywords_opt2_kwonly_opt__doc__,
+"test_posonly_keywords_opt2_kwonly_opt($module, a, /, b=None, c=None, *,\n"
+" d=None, e=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_KEYWORDS_OPT2_KWONLY_OPT_METHODDEF \
+ {"test_posonly_keywords_opt2_kwonly_opt", (PyCFunction)(void(*)(void))test_posonly_keywords_opt2_kwonly_opt, METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt2_kwonly_opt__doc__},
+
+static PyObject *
+test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c,
+ PyObject *d, PyObject *e);
+
+static PyObject *
+test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt2_kwonly_opt", 0};
+ PyObject *argsbuf[5];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+ PyObject *e = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[1]) {
+ b = args[1];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+skip_optional_pos:
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[3]) {
+ d = args[3];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ e = args[4];
+skip_optional_kwonly:
+ return_value = test_posonly_keywords_opt2_kwonly_opt_impl(module, a, b, c, d, e);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c,
+ PyObject *d, PyObject *e)
+/*[clinic end generated code: output=c809d7a84a2205e1 input=c95e2e1ec93035ad]*/
+
+
+/*[clinic input]
+test_posonly_opt_keywords_opt_kwonly_opt
+
+ a: object
+ b: object = None
+ /
+ c: object = None
+ d: object = None
+ *
+ e: object = None
+ f: object = None
+
+[clinic start generated code]*/
+
+PyDoc_STRVAR(test_posonly_opt_keywords_opt_kwonly_opt__doc__,
+"test_posonly_opt_keywords_opt_kwonly_opt($module, a, b=None, /, c=None,\n"
+" d=None, *, e=None, f=None)\n"
+"--\n"
+"\n");
+
+#define TEST_POSONLY_OPT_KEYWORDS_OPT_KWONLY_OPT_METHODDEF \
+ {"test_posonly_opt_keywords_opt_kwonly_opt", (PyCFunction)(void(*)(void))test_posonly_opt_keywords_opt_kwonly_opt, METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_keywords_opt_kwonly_opt__doc__},
+
+static PyObject *
+test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c,
+ PyObject *d, PyObject *e,
+ PyObject *f);
+
+static PyObject *
+test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", "", "c", "d", "e", "f", NULL};
+ static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_keywords_opt_kwonly_opt", 0};
+ PyObject *argsbuf[6];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
+ PyObject *a;
+ PyObject *b = Py_None;
+ PyObject *c = Py_None;
+ PyObject *d = Py_None;
+ PyObject *e = Py_None;
+ PyObject *f = Py_None;
+
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf);
+ if (!args) {
+ goto exit;
+ }
+ a = args[0];
+ if (nargs < 2) {
+ goto skip_optional_posonly;
+ }
+ noptargs--;
+ b = args[1];
+skip_optional_posonly:
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[2]) {
+ c = args[2];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+ if (args[3]) {
+ d = args[3];
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+skip_optional_pos:
+ if (!noptargs) {
+ goto skip_optional_kwonly;
+ }
+ if (args[4]) {
+ e = args[4];
+ if (!--noptargs) {
+ goto skip_optional_kwonly;
+ }
+ }
+ f = args[5];
+skip_optional_kwonly:
+ return_value = test_posonly_opt_keywords_opt_kwonly_opt_impl(module, a, b, c, d, e, f);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
+ PyObject *b, PyObject *c,
+ PyObject *d, PyObject *e,
+ PyObject *f)
+/*[clinic end generated code: output=719e4f6c224402d4 input=9914857713c5bbf8]*/