diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-06-09 16:27:06 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-06-09 16:27:06 (GMT) |
commit | f9f1ccace395a8f65b60dc12567a237b4002fd18 (patch) | |
tree | 548d13d71b8c4add81e9a1f677fd2b060ff958a3 /Python/getargs.c | |
parent | 57161aac5eb9bcb0b43e551a1937ff0a84c1ec52 (diff) | |
download | cpython-f9f1ccace395a8f65b60dc12567a237b4002fd18.zip cpython-f9f1ccace395a8f65b60dc12567a237b4002fd18.tar.gz cpython-f9f1ccace395a8f65b60dc12567a237b4002fd18.tar.bz2 |
Fix regression in error message introduced in bpo-29951. (#2028)
* Fix regression in error message introduced in bpo-29951.
* Add test.
* Make the test more strong.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index af1f2a2..f555870 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2089,13 +2089,13 @@ vgetargskeywordsfast_impl(PyObject **args, Py_ssize_t nargs, if (parser->max < nargs) { if (parser->max == 0) { PyErr_Format(PyExc_TypeError, - "%200s%s takes no positional arguments", + "%.200s%s takes no positional arguments", (parser->fname == NULL) ? "function" : parser->fname, (parser->fname == NULL) ? "" : "()"); } else { PyErr_Format(PyExc_TypeError, - "%200s%s takes %s %d positional arguments (%d given)", + "%.200s%s takes %s %d positional arguments (%d given)", (parser->fname == NULL) ? "function" : parser->fname, (parser->fname == NULL) ? "" : "()", (parser->min != INT_MAX) ? "at most" : "exactly", |