diff --git a/Python/getargs.c b/Python/getargs.c --- a/Python/getargs.c +++ b/Python/getargs.c @@ -1735,8 +1735,9 @@ if (name != NULL) PyErr_Format( PyExc_TypeError, - "%s expected %s%zd arguments, got %zd", - name, (min == max ? "" : "at least "), min, l); + "%s expected %s%zd positional argument%s, got %zd", + name, (min == max ? "" : "at least "), min, + (min == 1 ? "" : "s"), l); else PyErr_Format( PyExc_TypeError, @@ -1750,8 +1751,9 @@ if (name != NULL) PyErr_Format( PyExc_TypeError, - "%s expected %s%zd arguments, got %zd", - name, (min == max ? "" : "at most "), max, l); + "%s expected %s%zd positional argument%s, got %zd", + name, (min == max ? "" : "at most "), max, + (min == 1 ? "" : "s"), l); else PyErr_Format( PyExc_TypeError,