Issue #28257: Improved error message when pass a non-mapping as a var-keyword

argument.
This commit is contained in:
Serhiy Storchaka 2016-10-07 23:32:41 +03:00
parent de0574bdab
commit 5665301bae
2 changed files with 27 additions and 4 deletions

View file

@ -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):
...