[issue40679] show class name in method invocation TypeError

Dennis Sweeney report at bugs.python.org
Wed May 20 17:29:25 EDT 2020


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

I just ran the entire test suite with:

--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -4179,6 +4179,7 @@ _PyEval_EvalCode(PyThreadState *tstate,
         Py_ssize_t j;

         if (keyword == NULL || !PyUnicode_Check(keyword)) {
+            printf("THIS CODE WAS RUN!\n");
             _PyErr_Format(tstate, PyExc_TypeError,
                           "%U() keywords must be strings",
                           qualname);

and the line was never printed. So maybe the test coverage (or removal?) should be a separate issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40679>
_______________________________________


More information about the Python-bugs-list mailing list