diff options
author | Xtreak <tirkarthi@users.noreply.github.com> | 2018-07-23 01:43:26 +0530 |
---|---|---|
committer | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2018-07-22 13:13:26 -0700 |
commit | 1426daa4fe47d8f8be0d416f7cba7adae1d5839f (patch) | |
tree | d8b7b72876b1ee768402fcb320f9e0bdfa0f9b37 /Python/getargs.c | |
parent | c75c1e0e8aeb720ac3fcfab119b70cabba4e8235 (diff) | |
download | cpython-git-1426daa4fe47d8f8be0d416f7cba7adae1d5839f.tar.gz |
bpo-34127: Fix grammar in error message with respect to argument count (GH-8395)
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 992cb216c2..98823f22ed 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2411,8 +2411,8 @@ unpack_stack(PyObject *const *args, Py_ssize_t nargs, const char *name, if (name != NULL) PyErr_Format( PyExc_TypeError, - "%.200s expected %s%zd arguments, got %zd", - name, (min == max ? "" : "at least "), min, nargs); + "%.200s expected %s%zd argument%s, got %zd", + name, (min == max ? "" : "at least "), min, min == 1 ? "" : "s", nargs); else PyErr_Format( PyExc_TypeError, @@ -2430,8 +2430,8 @@ unpack_stack(PyObject *const *args, Py_ssize_t nargs, const char *name, if (name != NULL) PyErr_Format( PyExc_TypeError, - "%.200s expected %s%zd arguments, got %zd", - name, (min == max ? "" : "at most "), max, nargs); + "%.200s expected %s%zd argument%s, got %zd", + name, (min == max ? "" : "at most "), max, max == 1 ? "" : "s", nargs); else PyErr_Format( PyExc_TypeError, |