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 mark.dickinson
Recipients mark.dickinson, phr
Date 2022-04-08.10:13:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1649412789.74.0.282346855746.issue47257@roundup.psfhosted.org>
In-reply-to
Content
> but it's messy and potentially tricky to get the actual first and last values of the range

Doesn't simple indexing already provide what you need here?

>>> range(1, 5, 2)[0]  # first element of range
1
>>> range(1, 5, 2)[-1]  # last element of range
3
History
Date User Action Args
2022-04-08 10:13:09mark.dickinsonsetrecipients: + mark.dickinson, phr
2022-04-08 10:13:09mark.dickinsonsetmessageid: <1649412789.74.0.282346855746.issue47257@roundup.psfhosted.org>
2022-04-08 10:13:09mark.dickinsonlinkissue47257 messages
2022-04-08 10:13:09mark.dickinsoncreate