}
PyDoc_STRVAR(typevar_typing_subst__doc__,
-"__typing_subst__($self, /, arg)\n"
+"__typing_subst__($self, arg, /)\n"
"--\n"
"\n");
#define TYPEVAR_TYPING_SUBST_METHODDEF \
- {"__typing_subst__", _PyCFunction_CAST(typevar_typing_subst), METH_FASTCALL|METH_KEYWORDS, typevar_typing_subst__doc__},
-
-static PyObject *
-typevar_typing_subst_impl(typevarobject *self, PyObject *arg);
-
-static PyObject *
-typevar_typing_subst(typevarobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
-{
- PyObject *return_value = NULL;
- #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
-
- #define NUM_KEYWORDS 1
- static struct {
- PyGC_Head _this_is_not_used;
- PyObject_VAR_HEAD
- PyObject *ob_item[NUM_KEYWORDS];
- } _kwtuple = {
- .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
- .ob_item = { &_Py_ID(arg), },
- };
- #undef NUM_KEYWORDS
- #define KWTUPLE (&_kwtuple.ob_base.ob_base)
-
- #else // !Py_BUILD_CORE
- # define KWTUPLE NULL
- #endif // !Py_BUILD_CORE
-
- static const char * const _keywords[] = {"arg", NULL};
- static _PyArg_Parser _parser = {
- .keywords = _keywords,
- .fname = "__typing_subst__",
- .kwtuple = KWTUPLE,
- };
- #undef KWTUPLE
- PyObject *argsbuf[1];
- PyObject *arg;
-
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- arg = args[0];
- return_value = typevar_typing_subst_impl(self, arg);
-
-exit:
- return return_value;
-}
+ {"__typing_subst__", (PyCFunction)typevar_typing_subst, METH_O, typevar_typing_subst__doc__},
PyDoc_STRVAR(typevar_reduce__doc__,
"__reduce__($self, /)\n"
}
PyDoc_STRVAR(paramspec_typing_subst__doc__,
-"__typing_subst__($self, /, arg)\n"
+"__typing_subst__($self, arg, /)\n"
"--\n"
"\n");
#define PARAMSPEC_TYPING_SUBST_METHODDEF \
- {"__typing_subst__", _PyCFunction_CAST(paramspec_typing_subst), METH_FASTCALL|METH_KEYWORDS, paramspec_typing_subst__doc__},
-
-static PyObject *
-paramspec_typing_subst_impl(paramspecobject *self, PyObject *arg);
-
-static PyObject *
-paramspec_typing_subst(paramspecobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
-{
- PyObject *return_value = NULL;
- #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
-
- #define NUM_KEYWORDS 1
- static struct {
- PyGC_Head _this_is_not_used;
- PyObject_VAR_HEAD
- PyObject *ob_item[NUM_KEYWORDS];
- } _kwtuple = {
- .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
- .ob_item = { &_Py_ID(arg), },
- };
- #undef NUM_KEYWORDS
- #define KWTUPLE (&_kwtuple.ob_base.ob_base)
-
- #else // !Py_BUILD_CORE
- # define KWTUPLE NULL
- #endif // !Py_BUILD_CORE
-
- static const char * const _keywords[] = {"arg", NULL};
- static _PyArg_Parser _parser = {
- .keywords = _keywords,
- .fname = "__typing_subst__",
- .kwtuple = KWTUPLE,
- };
- #undef KWTUPLE
- PyObject *argsbuf[1];
- PyObject *arg;
-
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- arg = args[0];
- return_value = paramspec_typing_subst_impl(self, arg);
-
-exit:
- return return_value;
-}
+ {"__typing_subst__", (PyCFunction)paramspec_typing_subst, METH_O, paramspec_typing_subst__doc__},
PyDoc_STRVAR(paramspec_typing_prepare_subst__doc__,
-"__typing_prepare_subst__($self, /, alias, args)\n"
+"__typing_prepare_subst__($self, alias, args, /)\n"
"--\n"
"\n");
#define PARAMSPEC_TYPING_PREPARE_SUBST_METHODDEF \
- {"__typing_prepare_subst__", _PyCFunction_CAST(paramspec_typing_prepare_subst), METH_FASTCALL|METH_KEYWORDS, paramspec_typing_prepare_subst__doc__},
+ {"__typing_prepare_subst__", _PyCFunction_CAST(paramspec_typing_prepare_subst), METH_FASTCALL, paramspec_typing_prepare_subst__doc__},
static PyObject *
paramspec_typing_prepare_subst_impl(paramspecobject *self, PyObject *alias,
PyObject *args);
static PyObject *
-paramspec_typing_prepare_subst(paramspecobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+paramspec_typing_prepare_subst(paramspecobject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
- #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
-
- #define NUM_KEYWORDS 2
- static struct {
- PyGC_Head _this_is_not_used;
- PyObject_VAR_HEAD
- PyObject *ob_item[NUM_KEYWORDS];
- } _kwtuple = {
- .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
- .ob_item = { &_Py_ID(alias), &_Py_ID(args), },
- };
- #undef NUM_KEYWORDS
- #define KWTUPLE (&_kwtuple.ob_base.ob_base)
-
- #else // !Py_BUILD_CORE
- # define KWTUPLE NULL
- #endif // !Py_BUILD_CORE
-
- static const char * const _keywords[] = {"alias", "args", NULL};
- static _PyArg_Parser _parser = {
- .keywords = _keywords,
- .fname = "__typing_prepare_subst__",
- .kwtuple = KWTUPLE,
- };
- #undef KWTUPLE
- PyObject *argsbuf[2];
PyObject *alias;
PyObject *__clinic_args;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
- if (!args) {
+ if (!_PyArg_CheckPositional("__typing_prepare_subst__", nargs, 2, 2)) {
goto exit;
}
alias = args[0];
}
PyDoc_STRVAR(typevartuple_typing_subst__doc__,
-"__typing_subst__($self, /, arg)\n"
+"__typing_subst__($self, arg, /)\n"
"--\n"
"\n");
#define TYPEVARTUPLE_TYPING_SUBST_METHODDEF \
- {"__typing_subst__", _PyCFunction_CAST(typevartuple_typing_subst), METH_FASTCALL|METH_KEYWORDS, typevartuple_typing_subst__doc__},
-
-static PyObject *
-typevartuple_typing_subst_impl(typevartupleobject *self, PyObject *arg);
-
-static PyObject *
-typevartuple_typing_subst(typevartupleobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
-{
- PyObject *return_value = NULL;
- #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
-
- #define NUM_KEYWORDS 1
- static struct {
- PyGC_Head _this_is_not_used;
- PyObject_VAR_HEAD
- PyObject *ob_item[NUM_KEYWORDS];
- } _kwtuple = {
- .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
- .ob_item = { &_Py_ID(arg), },
- };
- #undef NUM_KEYWORDS
- #define KWTUPLE (&_kwtuple.ob_base.ob_base)
-
- #else // !Py_BUILD_CORE
- # define KWTUPLE NULL
- #endif // !Py_BUILD_CORE
-
- static const char * const _keywords[] = {"arg", NULL};
- static _PyArg_Parser _parser = {
- .keywords = _keywords,
- .fname = "__typing_subst__",
- .kwtuple = KWTUPLE,
- };
- #undef KWTUPLE
- PyObject *argsbuf[1];
- PyObject *arg;
-
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- arg = args[0];
- return_value = typevartuple_typing_subst_impl(self, arg);
-
-exit:
- return return_value;
-}
+ {"__typing_subst__", (PyCFunction)typevartuple_typing_subst, METH_O, typevartuple_typing_subst__doc__},
PyDoc_STRVAR(typevartuple_typing_prepare_subst__doc__,
-"__typing_prepare_subst__($self, /, alias, args)\n"
+"__typing_prepare_subst__($self, alias, args, /)\n"
"--\n"
"\n");
#define TYPEVARTUPLE_TYPING_PREPARE_SUBST_METHODDEF \
- {"__typing_prepare_subst__", _PyCFunction_CAST(typevartuple_typing_prepare_subst), METH_FASTCALL|METH_KEYWORDS, typevartuple_typing_prepare_subst__doc__},
+ {"__typing_prepare_subst__", _PyCFunction_CAST(typevartuple_typing_prepare_subst), METH_FASTCALL, typevartuple_typing_prepare_subst__doc__},
static PyObject *
typevartuple_typing_prepare_subst_impl(typevartupleobject *self,
PyObject *alias, PyObject *args);
static PyObject *
-typevartuple_typing_prepare_subst(typevartupleobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+typevartuple_typing_prepare_subst(typevartupleobject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
- #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
-
- #define NUM_KEYWORDS 2
- static struct {
- PyGC_Head _this_is_not_used;
- PyObject_VAR_HEAD
- PyObject *ob_item[NUM_KEYWORDS];
- } _kwtuple = {
- .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
- .ob_item = { &_Py_ID(alias), &_Py_ID(args), },
- };
- #undef NUM_KEYWORDS
- #define KWTUPLE (&_kwtuple.ob_base.ob_base)
-
- #else // !Py_BUILD_CORE
- # define KWTUPLE NULL
- #endif // !Py_BUILD_CORE
-
- static const char * const _keywords[] = {"alias", "args", NULL};
- static _PyArg_Parser _parser = {
- .keywords = _keywords,
- .fname = "__typing_prepare_subst__",
- .kwtuple = KWTUPLE,
- };
- #undef KWTUPLE
- PyObject *argsbuf[2];
PyObject *alias;
PyObject *__clinic_args;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
- if (!args) {
+ if (!_PyArg_CheckPositional("__typing_prepare_subst__", nargs, 2, 2)) {
goto exit;
}
alias = args[0];
exit:
return return_value;
}
-/*[clinic end generated code: output=807bcd30ebd10ac3 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d614edf64f28e346 input=a9049054013a1b77]*/
typevar.__typing_subst__ as typevar_typing_subst
arg: object
+ /
[clinic start generated code]*/
static PyObject *
-typevar_typing_subst_impl(typevarobject *self, PyObject *arg)
-/*[clinic end generated code: output=c76ced134ed8f4e1 input=6b70a4bb2da838de]*/
+typevar_typing_subst(typevarobject *self, PyObject *arg)
+/*[clinic end generated code: output=0773735e8ce18968 input=9e87b57f0fc59b92]*/
{
PyObject *args[2] = {(PyObject *)self, arg};
PyObject *result = call_typing_func_object("_typevar_subst", args, 2);
paramspec.__typing_subst__ as paramspec_typing_subst
arg: object
+ /
[clinic start generated code]*/
static PyObject *
-paramspec_typing_subst_impl(paramspecobject *self, PyObject *arg)
-/*[clinic end generated code: output=803e1ade3f13b57d input=4e0005d24023e896]*/
+paramspec_typing_subst(paramspecobject *self, PyObject *arg)
+/*[clinic end generated code: output=4c5b4aaada1c5814 input=2d5b5e3d4a717189]*/
{
PyObject *args[2] = {(PyObject *)self, arg};
PyObject *result = call_typing_func_object("_paramspec_subst", args, 2);
alias: object
args: object
+ /
[clinic start generated code]*/
static PyObject *
paramspec_typing_prepare_subst_impl(paramspecobject *self, PyObject *alias,
PyObject *args)
-/*[clinic end generated code: output=95449d630a2adb9a input=4375e2ffcb2ad635]*/
+/*[clinic end generated code: output=95449d630a2adb9a input=6df6f9fef3e150da]*/
{
PyObject *args_array[3] = {(PyObject *)self, alias, args};
PyObject *result = call_typing_func_object(
typevartuple.__typing_subst__ as typevartuple_typing_subst
arg: object
+ /
[clinic start generated code]*/
static PyObject *
-typevartuple_typing_subst_impl(typevartupleobject *self, PyObject *arg)
-/*[clinic end generated code: output=814316519441cd76 input=670c4e0a36e5d8c0]*/
+typevartuple_typing_subst(typevartupleobject *self, PyObject *arg)
+/*[clinic end generated code: output=237054c6d7484eea input=3fcf2dfd9eee7945]*/
{
PyErr_SetString(PyExc_TypeError, "Substitution of bare TypeVarTuple is not supported");
return NULL;
alias: object
args: object
+ /
[clinic start generated code]*/
static PyObject *
typevartuple_typing_prepare_subst_impl(typevartupleobject *self,
PyObject *alias, PyObject *args)
-/*[clinic end generated code: output=ff999bc5b02036c1 input=a211b05f2eeb4306]*/
+/*[clinic end generated code: output=ff999bc5b02036c1 input=685b149b0fc47556]*/
{
PyObject *args_array[3] = {(PyObject *)self, alias, args};
PyObject *result = call_typing_func_object(
#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES))
PyDoc_STRVAR(winreg_HKEYType___exit____doc__,
-"__exit__($self, /, exc_type, exc_value, traceback)\n"
+"__exit__($self, exc_type, exc_value, traceback, /)\n"
"--\n"
"\n");
#define WINREG_HKEYTYPE___EXIT___METHODDEF \
- {"__exit__", _PyCFunction_CAST(winreg_HKEYType___exit__), METH_FASTCALL|METH_KEYWORDS, winreg_HKEYType___exit____doc__},
+ {"__exit__", _PyCFunction_CAST(winreg_HKEYType___exit__), METH_FASTCALL, winreg_HKEYType___exit____doc__},
static PyObject *
winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type,
PyObject *exc_value, PyObject *traceback);
static PyObject *
-winreg_HKEYType___exit__(PyHKEYObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+winreg_HKEYType___exit__(PyHKEYObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
- #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
-
- #define NUM_KEYWORDS 3
- static struct {
- PyGC_Head _this_is_not_used;
- PyObject_VAR_HEAD
- PyObject *ob_item[NUM_KEYWORDS];
- } _kwtuple = {
- .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
- .ob_item = { &_Py_ID(exc_type), &_Py_ID(exc_value), &_Py_ID(traceback), },
- };
- #undef NUM_KEYWORDS
- #define KWTUPLE (&_kwtuple.ob_base.ob_base)
-
- #else // !Py_BUILD_CORE
- # define KWTUPLE NULL
- #endif // !Py_BUILD_CORE
-
- static const char * const _keywords[] = {"exc_type", "exc_value", "traceback", NULL};
- static _PyArg_Parser _parser = {
- .keywords = _keywords,
- .fname = "__exit__",
- .kwtuple = KWTUPLE,
- };
- #undef KWTUPLE
- PyObject *argsbuf[3];
PyObject *exc_type;
PyObject *exc_value;
PyObject *traceback;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf);
- if (!args) {
+ if (!_PyArg_CheckPositional("__exit__", nargs, 3, 3)) {
goto exit;
}
exc_type = args[0];
#ifndef WINREG_QUERYREFLECTIONKEY_METHODDEF
#define WINREG_QUERYREFLECTIONKEY_METHODDEF
#endif /* !defined(WINREG_QUERYREFLECTIONKEY_METHODDEF) */
-/*[clinic end generated code: output=00343ee8da923da8 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=2431b1b06b148722 input=a9049054013a1b77]*/