summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'Parser')
-rwxr-xr-xParser/asdl_c.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 08592bc..29e2547 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -595,8 +595,10 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
res = 0; /* if no error occurs, this stays 0 to the end */
if (PyTuple_GET_SIZE(args) > 0) {
if (numfields != PyTuple_GET_SIZE(args)) {
- PyErr_Format(PyExc_TypeError, "%.400s constructor takes either 0 or "
- "%d positional argument%s", Py_TYPE(self)->tp_name,
+ PyErr_Format(PyExc_TypeError, "%.400s constructor takes %s"
+ "%" PY_FORMAT_SIZE_T "d positional argument%s",
+ Py_TYPE(self)->tp_name,
+ numfields == 0 ? "" : "either 0 or ",
numfields, numfields == 1 ? "" : "s");
res = -1;
goto cleanup;