mirror of
https://github.com/python/cpython.git
synced 2025-11-12 03:22:06 +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
|
|
@ -8275,7 +8275,7 @@ PyObject *PyUnicode_Format(PyObject *format,
|
|||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue