Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 78792:2801bf875a24 2.7
use the stricter PyMapping_Check (closes #15801)
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Tue, 28 Aug 2012 17:55:35 -0400 |
| parents | 2fbee0b741f7 |
| children | 3b484f53f91b |
line wrap: on
line diff
--- a/Objects/stringobject.c Tue Aug 28 19:23:56 2012 +0200 +++ b/Objects/stringobject.c Tue Aug 28 17:55:35 2012 -0400 @@ -4254,7 +4254,7 @@ 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) {
