commit | 4da5bf644ab0aa836d29d076524c49cd9b6f3c03 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Wed Feb 07 22:24:07 2007 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Wed Feb 07 22:24:07 2007 +0000 |
tree | 26a725f7a7edb5a25eb1ddca722607d691115510 | |
parent | 5a0217efeab4b6b2437a431e06d1c91f07548209 [diff] [blame] |
Bug #1575169: operator.isSequenceType() now returns False for subclasses of dict.
diff --git a/Objects/abstract.c b/Objects/abstract.c index 7115c52..7462c58 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c
@@ -1157,6 +1157,8 @@ { if (s && PyInstance_Check(s)) return PyObject_HasAttrString(s, "__getitem__"); + if (PyObject_IsInstance(s, &PyDict_Type)) + return 0; return s != NULL && s->ob_type->tp_as_sequence && s->ob_type->tp_as_sequence->sq_item != NULL; }