[New-bugs-announce] [issue16543] Use "positional arguments" in PyArg_UnpackTuple

Ezio Melotti report at bugs.python.org
Fri Nov 23 19:03:13 CET 2012

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: http://bugs.python.org/file28090/unpacktuple.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list