This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti
Date 2012-11-23.18:03:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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)".
Date User Action Args
2012-11-23 18:03:13ezio.melottisetrecipients: + ezio.melotti
2012-11-23 18:03:13ezio.melottisetmessageid: <>
2012-11-23 18:03:13ezio.melottilinkissue16543 messages
2012-11-23 18:03:13ezio.melotticreate