Visitar URL original
bpo-45026: More compact range iterator (alt) by serhiy-storchaka · Pull Request #28176 · python/cpython · GitHub
Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into range-iter
  • Loading branch information
serhiy-storchaka committed Sep 5, 2021
commit 175b0d3bd125344f114955078dc6bdc85c45e415
9 changes: 1 addition & 8 deletions Objects/rangeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,14 +923,7 @@ fast_range_iter(long start, long stop, long step, long len)
return NULL;
it->start = start;
it->step = step;
ulen = get_len_of_range(start, stop, step);
if (ulen > (unsigned long)LONG_MAX) {
Py_DECREF(it);
PyErr_SetString(PyExc_OverflowError,
"range too large to represent as a range_iterator");
return NULL;
}
it->len = (long)ulen;
it->len = len;
return (PyObject *)it;
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.