Issue #28257: Improved error message when pass a non-mapping as a var-keyword
argument.
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py
index 015cdfc..9cb0d38 100644
--- a/Lib/test/test_extcall.py
+++ b/Lib/test/test_extcall.py
@@ -269,6 +269,16 @@
...
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):
...