improve error message from passing inadequate number of keyword arguments #6474

Note this removes the "non-keyword" or "keyword" phrases from these messages.
This commit is contained in:
Benjamin Peterson 2010-03-21 20:21:00 +00:00
parent 54bc22e9f3
commit 965458931f
3 changed files with 19 additions and 5 deletions

View file

@ -270,6 +270,15 @@ the function call setup. See <http://bugs.python.org/issue2016>.
... print a,b
>>> f(**x)
1 2
A obscure message:
>>> def f(a, b):
... pass
>>> f(b=1)
Traceback (most recent call last):
...
TypeError: f() takes exactly 2 arguments (1 given)
"""
import unittest