16#if PY_VERSION_HEX >= 0x030d0000
19int _PyArg_CheckPositional(
const char *
name, Py_ssize_t nargs, Py_ssize_t
min, Py_ssize_t
max)
25 if (
name !=
nullptr) {
26 PyErr_Format(PyExc_TypeError,
27 "%.200s expected %s%zd argument%s, got %zd",
29 (
min ==
max ?
"" :
"at least "),
35 PyErr_Format(PyExc_TypeError,
36 "unpacked tuple should have %s%zd element%s,"
38 (
min ==
max ?
"" :
"at least "),
51 if (
name !=
nullptr) {
52 PyErr_Format(PyExc_TypeError,
53 "%.200s expected %s%zd argument%s, got %zd",
55 (
min ==
max ?
"" :
"at most "),
61 PyErr_Format(PyExc_TypeError,
62 "unpacked tuple should have %s%zd element%s,"
64 (
min ==
max ?
"" :
"at most "),
header-only compatibility defines.