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 rhettinger
Recipients HosseinRanjbari, pablogsal, rhettinger
Date 2022-02-17.19:49:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645127371.9.0.626903714393.issue46783@roundup.psfhosted.org>
In-reply-to
Content
Thank you for the suggestion, but we will decline.  We looked at this before and decided not to go down this path, preferring instead to the keep the builtin function simple and focused on its core task of enumeration.

To cover the rarer cases, it is a simple matter to fulfill the need with fast, clear code using itertools:

>>> from itertools import count
>>> names = ['eddard', 'catelyn', 'robb', 'sansa', 'arya', 'bram', 'rickon']
>>> for i, name in zip(count(start=7, step=-1), names):
        print(i, name)

7 eddard
6 catelyn
5 robb
4 sansa
3 arya
2 bram
1 rickon
History
Date User Action Args
2022-02-17 19:49:31rhettingersetrecipients: + rhettinger, pablogsal, HosseinRanjbari
2022-02-17 19:49:31rhettingersetmessageid: <1645127371.9.0.626903714393.issue46783@roundup.psfhosted.org>
2022-02-17 19:49:31rhettingerlinkissue46783 messages
2022-02-17 19:49:31rhettingercreate