diff options
author | Xtreak <tirkarthi@users.noreply.github.com> | 2018-07-22 20:13:26 (GMT) |
---|---|---|
committer | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2018-07-22 20:13:26 (GMT) |
commit | 1426daa4fe47d8f8be0d416f7cba7adae1d5839f (patch) | |
tree | d8b7b72876b1ee768402fcb320f9e0bdfa0f9b37 /Python | |
parent | c75c1e0e8aeb720ac3fcfab119b70cabba4e8235 (diff) | |
download | cpython-1426daa4fe47d8f8be0d416f7cba7adae1d5839f.zip cpython-1426daa4fe47d8f8be0d416f7cba7adae1d5839f.tar.gz cpython-1426daa4fe47d8f8be0d416f7cba7adae1d5839f.tar.bz2 |
bpo-34127: Fix grammar in error message with respect to argument count (GH-8395)
Diffstat (limited to 'Python')
-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 992cb21..98823f2 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, |