This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney
Recipients Dennis Sweeney, lukasz.langa, rhettinger, serhiy.storchaka
Date 2021-08-27.05:09:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630040999.13.0.421010922122.issue45026@roundup.psfhosted.org>
In-reply-to
Content
Is it worth removing the len field as well and lazily using get_len_of_range() as needed?

Then the hot function can look something like:

static PyObject *
rangeiter_next(rangeiterobject *r)
{
    long result = r->start
    if (result < r->stop) {
        r->start += r->step;
        return PyLong_FromLong(result);
    }
    return NULL;
}
History
Date User Action Args
2021-08-27 05:09:59Dennis Sweeneysetrecipients: + Dennis Sweeney, rhettinger, lukasz.langa, serhiy.storchaka
2021-08-27 05:09:59Dennis Sweeneysetmessageid: <1630040999.13.0.421010922122.issue45026@roundup.psfhosted.org>
2021-08-27 05:09:59Dennis Sweeneylinkissue45026 messages
2021-08-27 05:09:59Dennis Sweeneycreate