mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
Issue #28257: Improved error message when pass a non-mapping as a var-keyword
argument.
This commit is contained in:
parent
de0574bdab
commit
5665301bae
2 changed files with 27 additions and 4 deletions
|
|
@ -269,6 +269,16 @@ not function
|
|||
...
|
||||
TypeError: h() argument after ** must be a mapping, not list
|
||||
|
||||
>>> h(**{'a': 1}, **h)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: h() argument after ** must be a mapping, not function
|
||||
|
||||
>>> h(**{'a': 1}, **[])
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: h() argument after ** must be a mapping, not list
|
||||
|
||||
>>> dir(**h)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue