Eric V. Smith added the comment:
Objects/unicodeobject.c has this, at line 14316:
if (PyMapping_Check(args) && !PyTuple_Check(args) && !PyUnicode_Check(args))
ctx.dict = args;
else
ctx.dict = NULL;
and later at line 14348:
if (ctx.argidx < ctx.arglen && !ctx.dict) {
PyErr_SetString(PyExc_TypeError,
"not all arguments converted during string formatting");
goto onError;
}
Because list now returns true for PyMapping_Check, this code thinks the list is
a dict and skips the error.
There's some discussion of PyMapping_Check in issue 5945.
----------
nosy: +eric.smith
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18750>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com