mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-23867: Argument Clinic: inline parsing code for a single positional parameter. (GH-9689)
This commit is contained in:
parent
65ce60aef1
commit
32d96a2b5b
49 changed files with 1677 additions and 275 deletions
|
@ -612,6 +612,14 @@ convertitem(PyObject *arg, const char **p_format, va_list *p_va, int flags,
|
|||
|
||||
/* Format an error message generated by convertsimple(). */
|
||||
|
||||
void
|
||||
_PyArg_BadArgument(const char *fname, const char *expected, PyObject *arg)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError, "%.200s() argument must be %.50s, not %.50s",
|
||||
fname, expected,
|
||||
arg == Py_None ? "None" : arg->ob_type->tp_name);
|
||||
}
|
||||
|
||||
static const char *
|
||||
converterr(const char *expected, PyObject *arg, char *msgbuf, size_t bufsize)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue