From f2f55e7f03d332fd43bc665a86d585a79c3b3ed4 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 13 Mar 2019 23:03:22 +0200 Subject: bpo-36282: Improved error message for too much positional arguments. (GH-12310) --- Python/getargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/getargs.c') diff --git a/Python/getargs.c b/Python/getargs.c index 876f5c76d2..77ded609ee 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2137,7 +2137,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs, "%.200s%s takes %s %d positional argument%s (%d given)", (parser->fname == NULL) ? "function" : parser->fname, (parser->fname == NULL) ? "" : "()", - (parser->min != INT_MAX) ? "at most" : "exactly", + (parser->min < parser->max) ? "at most" : "exactly", parser->max, parser->max == 1 ? "" : "s", nargs); -- cgit v1.2.1