mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
54bc22e9f3
commit
965458931f
3 changed files with 19 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue