diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 2b00a17425a..e7b47bde666 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -1154,6 +1154,7 @@ long_range: it = PyObject_New(longrangeiterobject, &PyLongRangeIter_Type); if (it == NULL) return NULL; + it->index = it->start = it->step = NULL; /* start + (len - 1) * step */ it->len = range->length;