bpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999)
It contains now the name of the parameter instead of its index when parameters
are supplied as a dict.
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
index 9de8f9b..26599b4 100644
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -295,7 +295,7 @@
Py_DECREF(binding_name_obj);
if (!current_param) {
if (!PyErr_Occurred() || PyErr_ExceptionMatches(PyExc_LookupError)) {
- PyErr_Format(pysqlite_ProgrammingError, "You did not supply a value for binding %d.", i);
+ PyErr_Format(pysqlite_ProgrammingError, "You did not supply a value for binding parameter :%s.", binding_name);
}
return;
}