bpo-30534: Fixed error messages when pass keyword arguments (#1901)
to functions implemented in C that don't support this.
Also unified error messages for functions that don't take positional or keyword
arguments.
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 1d11605..c20ca9b 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1176,7 +1176,7 @@
if (kwds != NULL && (!PyDict_Check(kwds) || PyDict_GET_SIZE(kwds) != 0)) {
PyErr_Format(PyExc_TypeError,
- "wrapper %s doesn't take keyword arguments",
+ "wrapper %s() takes no keyword arguments",
wp->descr->d_base->name);
return NULL;
}