[ python-Bugs-1496278 ] Incorrect error message related to **kwargs

SourceForge.net noreply at sourceforge.net
Sun May 28 08:36:23 CEST 2006


Bugs item #1496278, was opened at 2006-05-28 02:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496278&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Collin Winter (collinwinter)
Assigned to: Nobody/Anonymous (nobody)
Summary: Incorrect error message related to **kwargs

Initial Comment:
"""
>>> def foo(**kwargs):
...     pass
...
>>> foo(5, 6)
TypeError: foo() takes exactly 0 arguments (2 given)
"""

It clearly does take arguments, just not positional
arguments.

The attached patch changes the message above to "foo()
takes exactly 0 non-keyword arguments", as well as
changing the message in several other, similar cases.

The patch also updates Lib/test/output/test_extcall
appropriately.

The patch is against r46495.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496278&group_id=5470


More information about the Python-bugs-list mailing list