Message195309
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. |
|
Date |
User |
Action |
Args |
2013-08-16 04:04:02 | eric.smith | set | recipients:
+ eric.smith, vstinner, r.david.murray, asvetlov |
2013-08-16 04:04:02 | eric.smith | set | messageid: <1376625842.55.0.468693588955.issue18750@psf.upfronthosting.co.za> |
2013-08-16 04:04:02 | eric.smith | link | issue18750 messages |
2013-08-16 04:04:01 | eric.smith | create | |
|