diff options
author | Raymond Hettinger <python@rcn.com> | 2007-02-07 20:08:22 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2007-02-07 20:08:22 (GMT) |
commit | 0922d71604522398a0933bf516b5b466a414b772 (patch) | |
tree | 119e1821065dd7cc8ad48267147f5ddc6e8a9261 /Objects/dictobject.c | |
parent | 814ef237a2c1e42d98fd4c2c3b4afdc201140684 (diff) | |
download | cpython-0922d71604522398a0933bf516b5b466a414b772.zip cpython-0922d71604522398a0933bf516b5b466a414b772.tar.gz cpython-0922d71604522398a0933bf516b5b466a414b772.tar.bz2 |
SF #1615701: make d.update(m) honor __getitem__() and keys() in dict subclasses
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 5a5f860..901e333 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1306,7 +1306,7 @@ PyDict_Merge(PyObject *a, PyObject *b, int override) return -1; } mp = (dictobject*)a; - if (PyDict_Check(b)) { + if (PyDict_CheckExact(b)) { other = (dictobject*)b; if (other == mp || other->ma_used == 0) /* a.update(a) or a.update({}); nothing to do */ |