New submission from Ezio Melotti:

This came up in #16515.
While using PyArg_UnpackTuple to parse the positional arguments in a function 
that receives both positional and keyword arguments, the error message returned 
when the number of arguments is incorrect is misleading, e.g.:
>>> max(foo=1)
TypeError: max expected 1 arguments, got 0

This can be fixed by adding "positional" before "arguments" in the error 
message.  The attached patch fixes this and the pluralization of "argument(s)".

assignee: ezio.melotti
components: Interpreter Core
files: unpacktuple.diff
keywords: patch
messages: 176202
nosy: ezio.melotti
priority: normal
severity: normal
stage: test needed
status: open
title: Use "positional arguments" in PyArg_UnpackTuple
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file:

Python tracker <>
Python-bugs-list mailing list

Reply via email to