summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-08-28 21:55:35 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-08-28 21:55:35 (GMT)
commit28a6cfaefc41a4e4bfa6dd0b54318c0465987652 (patch)
treeb3334773d534a57edf85e637c30e2c07ce53f3b6 /Objects
parent2412c93a6068221686397c26b129215eac024e9c (diff)
downloadcpython-28a6cfaefc41a4e4bfa6dd0b54318c0465987652.zip
cpython-28a6cfaefc41a4e4bfa6dd0b54318c0465987652.tar.gz
cpython-28a6cfaefc41a4e4bfa6dd0b54318c0465987652.tar.bz2
use the stricter PyMapping_Check (closes #15801)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index b25b17b..8b782b4 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9504,8 +9504,7 @@ PyObject *PyUnicode_Format(PyObject *format,
arglen = -1;
argidx = -2;
}
- if (Py_TYPE(args)->tp_as_mapping && !PyTuple_Check(args) &&
- !PyUnicode_Check(args))
+ if (PyMapping_Check(args) && !PyTuple_Check(args) && !PyUnicode_Check(args))
dict = args;
while (--fmtcnt >= 0) {