summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 4e5838f..7016c2e 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -980,6 +980,8 @@ PyNumber_Float(PyObject *o)
int
PySequence_Check(PyObject *s)
{
+ if (PyObject_IsInstance(s, (PyObject *)&PyDict_Type))
+ return 0;
return s != NULL && s->ob_type->tp_as_sequence &&
s->ob_type->tp_as_sequence->sq_item != NULL;
}