2023-05-15 20:36:23 -07:00
|
|
|
/*[clinic input]
|
|
|
|
preserve
|
|
|
|
[clinic start generated code]*/
|
|
|
|
|
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
2023-08-31 23:42:34 +02:00
|
|
|
# include "pycore_gc.h" // PyGC_Head
|
|
|
|
# include "pycore_runtime.h" // _Py_ID()
|
2023-05-15 20:36:23 -07:00
|
|
|
#endif
|
2024-11-08 14:23:50 +02:00
|
|
|
#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
PyDoc_STRVAR(typevar_new__doc__,
|
2024-05-03 06:17:32 -07:00
|
|
|
"typevar(name, *constraints, bound=None, default=typing.NoDefault,\n"
|
|
|
|
" covariant=False, contravariant=False, infer_variance=False)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"Create a TypeVar.");
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevar_new_impl(PyTypeObject *type, PyObject *name, PyObject *constraints,
|
2024-05-03 06:17:32 -07:00
|
|
|
PyObject *bound, PyObject *default_value, int covariant,
|
|
|
|
int contravariant, int infer_variance);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
#define NUM_KEYWORDS 6
|
2023-05-15 20:36:23 -07:00
|
|
|
static struct {
|
|
|
|
PyGC_Head _this_is_not_used;
|
|
|
|
PyObject_VAR_HEAD
|
2025-03-27 09:57:06 -04:00
|
|
|
Py_hash_t ob_hash;
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
2025-03-27 09:57:06 -04:00
|
|
|
.ob_hash = -1,
|
2024-05-03 06:17:32 -07:00
|
|
|
.ob_item = { &_Py_ID(name), &_Py_ID(bound), &_Py_ID(default), &_Py_ID(covariant), &_Py_ID(contravariant), &_Py_ID(infer_variance), },
|
2023-05-15 20:36:23 -07:00
|
|
|
};
|
|
|
|
#undef NUM_KEYWORDS
|
|
|
|
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
|
|
|
|
|
|
|
|
#else // !Py_BUILD_CORE
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif // !Py_BUILD_CORE
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
static const char * const _keywords[] = {"name", "bound", "default", "covariant", "contravariant", "infer_variance", NULL};
|
2023-05-15 20:36:23 -07:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "typevar",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2024-11-07 23:40:03 +02:00
|
|
|
PyObject *argsbuf[6];
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject * const *fastargs;
|
|
|
|
Py_ssize_t nargs = PyTuple_GET_SIZE(args);
|
|
|
|
Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 1;
|
|
|
|
PyObject *name;
|
|
|
|
PyObject *constraints = NULL;
|
|
|
|
PyObject *bound = Py_None;
|
2024-05-03 06:17:32 -07:00
|
|
|
PyObject *default_value = &_Py_NoDefaultStruct;
|
2023-05-15 20:36:23 -07:00
|
|
|
int covariant = 0;
|
|
|
|
int contravariant = 0;
|
|
|
|
int infer_variance = 0;
|
|
|
|
|
2024-11-08 14:23:50 +02:00
|
|
|
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
|
|
|
|
/*minpos*/ 1, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 1, argsbuf);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (!fastargs) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!PyUnicode_Check(fastargs[0])) {
|
|
|
|
_PyArg_BadArgument("typevar", "argument 'name'", "str", fastargs[0]);
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
name = fastargs[0];
|
|
|
|
if (!noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
2024-11-07 23:40:03 +02:00
|
|
|
if (fastargs[1]) {
|
|
|
|
bound = fastargs[1];
|
2023-05-15 20:36:23 -07:00
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
2024-11-07 23:40:03 +02:00
|
|
|
if (fastargs[2]) {
|
|
|
|
default_value = fastargs[2];
|
2024-05-03 06:17:32 -07:00
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
2024-11-07 23:40:03 +02:00
|
|
|
if (fastargs[3]) {
|
|
|
|
covariant = PyObject_IsTrue(fastargs[3]);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (covariant < 0) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
2024-11-07 23:40:03 +02:00
|
|
|
if (fastargs[4]) {
|
|
|
|
contravariant = PyObject_IsTrue(fastargs[4]);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (contravariant < 0) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
2024-11-07 23:40:03 +02:00
|
|
|
infer_variance = PyObject_IsTrue(fastargs[5]);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (infer_variance < 0) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
skip_optional_kwonly:
|
2024-11-07 23:40:03 +02:00
|
|
|
constraints = PyTuple_GetSlice(args, 1, PY_SSIZE_T_MAX);
|
|
|
|
if (!constraints) {
|
|
|
|
goto exit;
|
|
|
|
}
|
2024-05-03 06:17:32 -07:00
|
|
|
return_value = typevar_new_impl(type, name, constraints, bound, default_value, covariant, contravariant, infer_variance);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
exit:
|
2024-11-07 23:40:03 +02:00
|
|
|
/* Cleanup for constraints */
|
2023-05-15 20:36:23 -07:00
|
|
|
Py_XDECREF(constraints);
|
2024-11-07 23:40:03 +02:00
|
|
|
|
2023-05-15 20:36:23 -07:00
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(typevar_typing_subst__doc__,
|
2023-08-29 17:55:56 +03:00
|
|
|
"__typing_subst__($self, arg, /)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEVAR_TYPING_SUBST_METHODDEF \
|
2023-08-29 17:55:56 +03:00
|
|
|
{"__typing_subst__", (PyCFunction)typevar_typing_subst, METH_O, typevar_typing_subst__doc__},
|
2023-05-15 20:36:23 -07:00
|
|
|
|
2025-03-11 16:33:36 +01:00
|
|
|
static PyObject *
|
|
|
|
typevar_typing_subst_impl(typevarobject *self, PyObject *arg);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevar_typing_subst(PyObject *self, PyObject *arg)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
|
|
|
|
return_value = typevar_typing_subst_impl((typevarobject *)self, arg);
|
|
|
|
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
PyDoc_STRVAR(typevar_typing_prepare_subst__doc__,
|
|
|
|
"__typing_prepare_subst__($self, alias, args, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEVAR_TYPING_PREPARE_SUBST_METHODDEF \
|
|
|
|
{"__typing_prepare_subst__", _PyCFunction_CAST(typevar_typing_prepare_subst), METH_FASTCALL, typevar_typing_prepare_subst__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevar_typing_prepare_subst_impl(typevarobject *self, PyObject *alias,
|
|
|
|
PyObject *args);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
typevar_typing_prepare_subst(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
2024-05-03 06:17:32 -07:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
PyObject *alias;
|
|
|
|
PyObject *__clinic_args;
|
|
|
|
|
|
|
|
if (!_PyArg_CheckPositional("__typing_prepare_subst__", nargs, 2, 2)) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
alias = args[0];
|
|
|
|
__clinic_args = args[1];
|
2025-01-20 12:40:18 +01:00
|
|
|
return_value = typevar_typing_prepare_subst_impl((typevarobject *)self, alias, __clinic_args);
|
2024-05-03 06:17:32 -07:00
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
2023-05-15 20:36:23 -07:00
|
|
|
PyDoc_STRVAR(typevar_reduce__doc__,
|
|
|
|
"__reduce__($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEVAR_REDUCE_METHODDEF \
|
|
|
|
{"__reduce__", (PyCFunction)typevar_reduce, METH_NOARGS, typevar_reduce__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevar_reduce_impl(typevarobject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
typevar_reduce(PyObject *self, PyObject *Py_UNUSED(ignored))
|
2023-05-15 20:36:23 -07:00
|
|
|
{
|
2025-01-20 12:40:18 +01:00
|
|
|
return typevar_reduce_impl((typevarobject *)self);
|
2023-05-15 20:36:23 -07:00
|
|
|
}
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
PyDoc_STRVAR(typevar_has_default__doc__,
|
|
|
|
"has_default($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEVAR_HAS_DEFAULT_METHODDEF \
|
|
|
|
{"has_default", (PyCFunction)typevar_has_default, METH_NOARGS, typevar_has_default__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevar_has_default_impl(typevarobject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
typevar_has_default(PyObject *self, PyObject *Py_UNUSED(ignored))
|
2024-05-03 06:17:32 -07:00
|
|
|
{
|
2025-01-20 12:40:18 +01:00
|
|
|
return typevar_has_default_impl((typevarobject *)self);
|
2024-05-03 06:17:32 -07:00
|
|
|
}
|
|
|
|
|
2023-05-15 20:36:23 -07:00
|
|
|
PyDoc_STRVAR(paramspecargs_new__doc__,
|
|
|
|
"paramspecargs(origin)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"Create a ParamSpecArgs object.");
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspecargs_new_impl(PyTypeObject *type, PyObject *origin);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspecargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
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
|
2025-03-27 09:57:06 -04:00
|
|
|
Py_hash_t ob_hash;
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
2025-03-27 09:57:06 -04:00
|
|
|
.ob_hash = -1,
|
2023-05-15 20:36:23 -07:00
|
|
|
.ob_item = { &_Py_ID(origin), },
|
|
|
|
};
|
|
|
|
#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[] = {"origin", NULL};
|
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "paramspecargs",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
|
|
|
PyObject *argsbuf[1];
|
|
|
|
PyObject * const *fastargs;
|
|
|
|
Py_ssize_t nargs = PyTuple_GET_SIZE(args);
|
|
|
|
PyObject *origin;
|
|
|
|
|
2024-11-08 14:23:50 +02:00
|
|
|
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
|
|
|
|
/*minpos*/ 1, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (!fastargs) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
origin = fastargs[0];
|
|
|
|
return_value = paramspecargs_new_impl(type, origin);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(paramspeckwargs_new__doc__,
|
|
|
|
"paramspeckwargs(origin)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"Create a ParamSpecKwargs object.");
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspeckwargs_new_impl(PyTypeObject *type, PyObject *origin);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspeckwargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
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
|
2025-03-27 09:57:06 -04:00
|
|
|
Py_hash_t ob_hash;
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
2025-03-27 09:57:06 -04:00
|
|
|
.ob_hash = -1,
|
2023-05-15 20:36:23 -07:00
|
|
|
.ob_item = { &_Py_ID(origin), },
|
|
|
|
};
|
|
|
|
#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[] = {"origin", NULL};
|
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "paramspeckwargs",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
|
|
|
PyObject *argsbuf[1];
|
|
|
|
PyObject * const *fastargs;
|
|
|
|
Py_ssize_t nargs = PyTuple_GET_SIZE(args);
|
|
|
|
PyObject *origin;
|
|
|
|
|
2024-11-08 14:23:50 +02:00
|
|
|
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
|
|
|
|
/*minpos*/ 1, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (!fastargs) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
origin = fastargs[0];
|
|
|
|
return_value = paramspeckwargs_new_impl(type, origin);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(paramspec_new__doc__,
|
2024-05-03 06:17:32 -07:00
|
|
|
"paramspec(name, *, bound=None, default=typing.NoDefault,\n"
|
|
|
|
" covariant=False, contravariant=False, infer_variance=False)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"Create a ParamSpec object.");
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspec_new_impl(PyTypeObject *type, PyObject *name, PyObject *bound,
|
2024-05-03 06:17:32 -07:00
|
|
|
PyObject *default_value, int covariant, int contravariant,
|
|
|
|
int infer_variance);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
#define NUM_KEYWORDS 6
|
2023-05-15 20:36:23 -07:00
|
|
|
static struct {
|
|
|
|
PyGC_Head _this_is_not_used;
|
|
|
|
PyObject_VAR_HEAD
|
2025-03-27 09:57:06 -04:00
|
|
|
Py_hash_t ob_hash;
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
2025-03-27 09:57:06 -04:00
|
|
|
.ob_hash = -1,
|
2024-05-03 06:17:32 -07:00
|
|
|
.ob_item = { &_Py_ID(name), &_Py_ID(bound), &_Py_ID(default), &_Py_ID(covariant), &_Py_ID(contravariant), &_Py_ID(infer_variance), },
|
2023-05-15 20:36:23 -07:00
|
|
|
};
|
|
|
|
#undef NUM_KEYWORDS
|
|
|
|
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
|
|
|
|
|
|
|
|
#else // !Py_BUILD_CORE
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif // !Py_BUILD_CORE
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
static const char * const _keywords[] = {"name", "bound", "default", "covariant", "contravariant", "infer_variance", NULL};
|
2023-05-15 20:36:23 -07:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "paramspec",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2024-05-03 06:17:32 -07:00
|
|
|
PyObject *argsbuf[6];
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject * const *fastargs;
|
|
|
|
Py_ssize_t nargs = PyTuple_GET_SIZE(args);
|
|
|
|
Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 1;
|
|
|
|
PyObject *name;
|
|
|
|
PyObject *bound = Py_None;
|
2024-05-03 06:17:32 -07:00
|
|
|
PyObject *default_value = &_Py_NoDefaultStruct;
|
2023-05-15 20:36:23 -07:00
|
|
|
int covariant = 0;
|
|
|
|
int contravariant = 0;
|
|
|
|
int infer_variance = 0;
|
|
|
|
|
2024-11-08 14:23:50 +02:00
|
|
|
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
|
|
|
|
/*minpos*/ 1, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (!fastargs) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!PyUnicode_Check(fastargs[0])) {
|
|
|
|
_PyArg_BadArgument("paramspec", "argument 'name'", "str", fastargs[0]);
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
name = fastargs[0];
|
|
|
|
if (!noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
if (fastargs[1]) {
|
|
|
|
bound = fastargs[1];
|
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (fastargs[2]) {
|
2024-05-03 06:17:32 -07:00
|
|
|
default_value = fastargs[2];
|
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (fastargs[3]) {
|
|
|
|
covariant = PyObject_IsTrue(fastargs[3]);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (covariant < 0) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
2024-05-03 06:17:32 -07:00
|
|
|
if (fastargs[4]) {
|
|
|
|
contravariant = PyObject_IsTrue(fastargs[4]);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (contravariant < 0) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
2024-05-03 06:17:32 -07:00
|
|
|
infer_variance = PyObject_IsTrue(fastargs[5]);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (infer_variance < 0) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
skip_optional_kwonly:
|
2024-05-03 06:17:32 -07:00
|
|
|
return_value = paramspec_new_impl(type, name, bound, default_value, covariant, contravariant, infer_variance);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(paramspec_typing_subst__doc__,
|
2023-08-29 17:55:56 +03:00
|
|
|
"__typing_subst__($self, arg, /)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define PARAMSPEC_TYPING_SUBST_METHODDEF \
|
2023-08-29 17:55:56 +03:00
|
|
|
{"__typing_subst__", (PyCFunction)paramspec_typing_subst, METH_O, paramspec_typing_subst__doc__},
|
2023-05-15 20:36:23 -07:00
|
|
|
|
2025-03-11 16:33:36 +01:00
|
|
|
static PyObject *
|
|
|
|
paramspec_typing_subst_impl(paramspecobject *self, PyObject *arg);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspec_typing_subst(PyObject *self, PyObject *arg)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
|
|
|
|
return_value = paramspec_typing_subst_impl((paramspecobject *)self, arg);
|
|
|
|
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
2023-05-15 20:36:23 -07:00
|
|
|
PyDoc_STRVAR(paramspec_typing_prepare_subst__doc__,
|
2023-08-29 17:55:56 +03:00
|
|
|
"__typing_prepare_subst__($self, alias, args, /)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define PARAMSPEC_TYPING_PREPARE_SUBST_METHODDEF \
|
2023-08-29 17:55:56 +03:00
|
|
|
{"__typing_prepare_subst__", _PyCFunction_CAST(paramspec_typing_prepare_subst), METH_FASTCALL, paramspec_typing_prepare_subst__doc__},
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspec_typing_prepare_subst_impl(paramspecobject *self, PyObject *alias,
|
|
|
|
PyObject *args);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
paramspec_typing_prepare_subst(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
2023-05-15 20:36:23 -07:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
PyObject *alias;
|
|
|
|
PyObject *__clinic_args;
|
|
|
|
|
2023-08-29 17:55:56 +03:00
|
|
|
if (!_PyArg_CheckPositional("__typing_prepare_subst__", nargs, 2, 2)) {
|
2023-05-15 20:36:23 -07:00
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
alias = args[0];
|
|
|
|
__clinic_args = args[1];
|
2025-01-20 12:40:18 +01:00
|
|
|
return_value = paramspec_typing_prepare_subst_impl((paramspecobject *)self, alias, __clinic_args);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(paramspec_reduce__doc__,
|
|
|
|
"__reduce__($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define PARAMSPEC_REDUCE_METHODDEF \
|
|
|
|
{"__reduce__", (PyCFunction)paramspec_reduce, METH_NOARGS, paramspec_reduce__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspec_reduce_impl(paramspecobject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
paramspec_reduce(PyObject *self, PyObject *Py_UNUSED(ignored))
|
2023-05-15 20:36:23 -07:00
|
|
|
{
|
2025-01-20 12:40:18 +01:00
|
|
|
return paramspec_reduce_impl((paramspecobject *)self);
|
2023-05-15 20:36:23 -07:00
|
|
|
}
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
PyDoc_STRVAR(paramspec_has_default__doc__,
|
|
|
|
"has_default($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define PARAMSPEC_HAS_DEFAULT_METHODDEF \
|
|
|
|
{"has_default", (PyCFunction)paramspec_has_default, METH_NOARGS, paramspec_has_default__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
paramspec_has_default_impl(paramspecobject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
paramspec_has_default(PyObject *self, PyObject *Py_UNUSED(ignored))
|
2024-05-03 06:17:32 -07:00
|
|
|
{
|
2025-01-20 12:40:18 +01:00
|
|
|
return paramspec_has_default_impl((paramspecobject *)self);
|
2024-05-03 06:17:32 -07:00
|
|
|
}
|
|
|
|
|
2023-05-15 20:36:23 -07:00
|
|
|
PyDoc_STRVAR(typevartuple__doc__,
|
2024-05-03 06:17:32 -07:00
|
|
|
"typevartuple(name, *, default=typing.NoDefault)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"Create a new TypeVarTuple with the given name.");
|
|
|
|
|
|
|
|
static PyObject *
|
2024-05-03 06:17:32 -07:00
|
|
|
typevartuple_impl(PyTypeObject *type, PyObject *name,
|
|
|
|
PyObject *default_value);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevartuple(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
#define NUM_KEYWORDS 2
|
2023-05-15 20:36:23 -07:00
|
|
|
static struct {
|
|
|
|
PyGC_Head _this_is_not_used;
|
|
|
|
PyObject_VAR_HEAD
|
2025-03-27 09:57:06 -04:00
|
|
|
Py_hash_t ob_hash;
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
2025-03-27 09:57:06 -04:00
|
|
|
.ob_hash = -1,
|
2024-05-03 06:17:32 -07:00
|
|
|
.ob_item = { &_Py_ID(name), &_Py_ID(default), },
|
2023-05-15 20:36:23 -07:00
|
|
|
};
|
|
|
|
#undef NUM_KEYWORDS
|
|
|
|
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
|
|
|
|
|
|
|
|
#else // !Py_BUILD_CORE
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif // !Py_BUILD_CORE
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
static const char * const _keywords[] = {"name", "default", NULL};
|
2023-05-15 20:36:23 -07:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "typevartuple",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2024-05-03 06:17:32 -07:00
|
|
|
PyObject *argsbuf[2];
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject * const *fastargs;
|
|
|
|
Py_ssize_t nargs = PyTuple_GET_SIZE(args);
|
2024-05-03 06:17:32 -07:00
|
|
|
Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 1;
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject *name;
|
2024-05-03 06:17:32 -07:00
|
|
|
PyObject *default_value = &_Py_NoDefaultStruct;
|
2023-05-15 20:36:23 -07:00
|
|
|
|
2024-11-08 14:23:50 +02:00
|
|
|
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
|
|
|
|
/*minpos*/ 1, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (!fastargs) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!PyUnicode_Check(fastargs[0])) {
|
|
|
|
_PyArg_BadArgument("typevartuple", "argument 'name'", "str", fastargs[0]);
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
name = fastargs[0];
|
2024-05-03 06:17:32 -07:00
|
|
|
if (!noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
default_value = fastargs[1];
|
|
|
|
skip_optional_kwonly:
|
|
|
|
return_value = typevartuple_impl(type, name, default_value);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(typevartuple_typing_subst__doc__,
|
2023-08-29 17:55:56 +03:00
|
|
|
"__typing_subst__($self, arg, /)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEVARTUPLE_TYPING_SUBST_METHODDEF \
|
2023-08-29 17:55:56 +03:00
|
|
|
{"__typing_subst__", (PyCFunction)typevartuple_typing_subst, METH_O, typevartuple_typing_subst__doc__},
|
2023-05-15 20:36:23 -07:00
|
|
|
|
2025-03-11 16:33:36 +01:00
|
|
|
static PyObject *
|
|
|
|
typevartuple_typing_subst_impl(typevartupleobject *self, PyObject *arg);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevartuple_typing_subst(PyObject *self, PyObject *arg)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
|
|
|
|
return_value = typevartuple_typing_subst_impl((typevartupleobject *)self, arg);
|
|
|
|
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
2023-05-15 20:36:23 -07:00
|
|
|
PyDoc_STRVAR(typevartuple_typing_prepare_subst__doc__,
|
2023-08-29 17:55:56 +03:00
|
|
|
"__typing_prepare_subst__($self, alias, args, /)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEVARTUPLE_TYPING_PREPARE_SUBST_METHODDEF \
|
2023-08-29 17:55:56 +03:00
|
|
|
{"__typing_prepare_subst__", _PyCFunction_CAST(typevartuple_typing_prepare_subst), METH_FASTCALL, typevartuple_typing_prepare_subst__doc__},
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevartuple_typing_prepare_subst_impl(typevartupleobject *self,
|
|
|
|
PyObject *alias, PyObject *args);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
typevartuple_typing_prepare_subst(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
2023-05-15 20:36:23 -07:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
PyObject *alias;
|
|
|
|
PyObject *__clinic_args;
|
|
|
|
|
2023-08-29 17:55:56 +03:00
|
|
|
if (!_PyArg_CheckPositional("__typing_prepare_subst__", nargs, 2, 2)) {
|
2023-05-15 20:36:23 -07:00
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
alias = args[0];
|
|
|
|
__clinic_args = args[1];
|
2025-01-20 12:40:18 +01:00
|
|
|
return_value = typevartuple_typing_prepare_subst_impl((typevartupleobject *)self, alias, __clinic_args);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(typevartuple_reduce__doc__,
|
|
|
|
"__reduce__($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEVARTUPLE_REDUCE_METHODDEF \
|
|
|
|
{"__reduce__", (PyCFunction)typevartuple_reduce, METH_NOARGS, typevartuple_reduce__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevartuple_reduce_impl(typevartupleobject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
typevartuple_reduce(PyObject *self, PyObject *Py_UNUSED(ignored))
|
2023-05-15 20:36:23 -07:00
|
|
|
{
|
2025-01-20 12:40:18 +01:00
|
|
|
return typevartuple_reduce_impl((typevartupleobject *)self);
|
2023-05-15 20:36:23 -07:00
|
|
|
}
|
|
|
|
|
2024-05-03 06:17:32 -07:00
|
|
|
PyDoc_STRVAR(typevartuple_has_default__doc__,
|
|
|
|
"has_default($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEVARTUPLE_HAS_DEFAULT_METHODDEF \
|
|
|
|
{"has_default", (PyCFunction)typevartuple_has_default, METH_NOARGS, typevartuple_has_default__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typevartuple_has_default_impl(typevartupleobject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
typevartuple_has_default(PyObject *self, PyObject *Py_UNUSED(ignored))
|
2024-05-03 06:17:32 -07:00
|
|
|
{
|
2025-01-20 12:40:18 +01:00
|
|
|
return typevartuple_has_default_impl((typevartupleobject *)self);
|
2024-05-03 06:17:32 -07:00
|
|
|
}
|
|
|
|
|
2023-05-15 20:36:23 -07:00
|
|
|
PyDoc_STRVAR(typealias_reduce__doc__,
|
|
|
|
"__reduce__($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define TYPEALIAS_REDUCE_METHODDEF \
|
|
|
|
{"__reduce__", (PyCFunction)typealias_reduce, METH_NOARGS, typealias_reduce__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typealias_reduce_impl(typealiasobject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
2025-01-20 12:40:18 +01:00
|
|
|
typealias_reduce(PyObject *self, PyObject *Py_UNUSED(ignored))
|
2023-05-15 20:36:23 -07:00
|
|
|
{
|
2025-01-20 12:40:18 +01:00
|
|
|
return typealias_reduce_impl((typealiasobject *)self);
|
2023-05-15 20:36:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(typealias_new__doc__,
|
2025-10-15 19:08:17 +03:00
|
|
|
"typealias(name, value, *, type_params=<unrepresentable>, qualname=None)\n"
|
2023-05-15 20:36:23 -07:00
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"Create a TypeAliasType.");
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typealias_new_impl(PyTypeObject *type, PyObject *name, PyObject *value,
|
2025-10-15 19:08:17 +03:00
|
|
|
PyObject *type_params, PyObject *qualname);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
|
|
|
2025-10-15 19:08:17 +03:00
|
|
|
#define NUM_KEYWORDS 4
|
2023-05-15 20:36:23 -07:00
|
|
|
static struct {
|
|
|
|
PyGC_Head _this_is_not_used;
|
|
|
|
PyObject_VAR_HEAD
|
2025-03-27 09:57:06 -04:00
|
|
|
Py_hash_t ob_hash;
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
2025-03-27 09:57:06 -04:00
|
|
|
.ob_hash = -1,
|
2025-10-15 19:08:17 +03:00
|
|
|
.ob_item = { &_Py_ID(name), &_Py_ID(value), &_Py_ID(type_params), &_Py_ID(qualname), },
|
2023-05-15 20:36:23 -07:00
|
|
|
};
|
|
|
|
#undef NUM_KEYWORDS
|
|
|
|
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
|
|
|
|
|
|
|
|
#else // !Py_BUILD_CORE
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif // !Py_BUILD_CORE
|
|
|
|
|
2025-10-15 19:08:17 +03:00
|
|
|
static const char * const _keywords[] = {"name", "value", "type_params", "qualname", NULL};
|
2023-05-15 20:36:23 -07:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "typealias",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2025-10-15 19:08:17 +03:00
|
|
|
PyObject *argsbuf[4];
|
2023-05-15 20:36:23 -07:00
|
|
|
PyObject * const *fastargs;
|
|
|
|
Py_ssize_t nargs = PyTuple_GET_SIZE(args);
|
|
|
|
Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 2;
|
|
|
|
PyObject *name;
|
|
|
|
PyObject *value;
|
|
|
|
PyObject *type_params = NULL;
|
2025-10-15 19:08:17 +03:00
|
|
|
PyObject *qualname = NULL;
|
2023-05-15 20:36:23 -07:00
|
|
|
|
2024-11-08 14:23:50 +02:00
|
|
|
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
|
|
|
|
/*minpos*/ 2, /*maxpos*/ 2, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
|
2023-05-15 20:36:23 -07:00
|
|
|
if (!fastargs) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!PyUnicode_Check(fastargs[0])) {
|
|
|
|
_PyArg_BadArgument("typealias", "argument 'name'", "str", fastargs[0]);
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
name = fastargs[0];
|
|
|
|
value = fastargs[1];
|
|
|
|
if (!noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
2025-10-15 19:08:17 +03:00
|
|
|
if (fastargs[2]) {
|
|
|
|
type_params = fastargs[2];
|
|
|
|
if (!--noptargs) {
|
|
|
|
goto skip_optional_kwonly;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
qualname = fastargs[3];
|
2023-05-15 20:36:23 -07:00
|
|
|
skip_optional_kwonly:
|
2025-10-15 19:08:17 +03:00
|
|
|
return_value = typealias_new_impl(type, name, value, type_params, qualname);
|
2023-05-15 20:36:23 -07:00
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
2025-10-15 19:08:17 +03:00
|
|
|
/*[clinic end generated code: output=67ab9a5d1869f2c9 input=a9049054013a1b77]*/
|