mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
use the stricter PyMapping_Check (closes #15801)
This commit is contained in:
parent
25cf30faf9
commit
23d49d3e7e
4 changed files with 8 additions and 2 deletions
|
@ -4254,7 +4254,7 @@ PyString_Format(PyObject *format, PyObject *args)
|
|||
arglen = -1;
|
||||
argidx = -2;
|
||||
}
|
||||
if (Py_TYPE(args)->tp_as_mapping && !PyTuple_Check(args) &&
|
||||
if (PyMapping_Check(args) && !PyTuple_Check(args) &&
|
||||
!PyObject_TypeCheck(args, &PyBaseString_Type))
|
||||
dict = args;
|
||||
while (--fmtcnt >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue