Raymond Hettinger <[email protected]> added the comment:
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
----------
assignee: -> rhettinger
nosy: +rhettinger
resolution: -> rejected
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46783>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com