diff options
Diffstat (limited to 'Modules/collectionsmodule.c')
-rw-r--r-- | Modules/collectionsmodule.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c index cb12b3a6a7..ca4b327059 100644 --- a/Modules/collectionsmodule.c +++ b/Modules/collectionsmodule.c @@ -911,15 +911,14 @@ dequeiter_next(dequeiterobject *it) { PyObject *item; - if (it->counter == 0) - return NULL; - if (it->deque->state != it->state) { it->counter = 0; PyErr_SetString(PyExc_RuntimeError, "deque mutated during iteration"); return NULL; } + if (it->counter == 0) + return NULL; assert (!(it->b == it->deque->rightblock && it->index > it->deque->rightindex)); |