[New-bugs-announce] [issue39596] reverse parameter for enumerate()

wyz23x2 report at bugs.python.org
Mon Feb 10 02:35:43 EST 2020


New submission from wyz23x2 <wyz23x2 at 163.com>:

Starting from Python 2.3, the handy enumerate() was introduced.
However, I suggest to add a "reverse" parameter:
>>> lis = ['a', 'b', 'c', 'd']
>>> list(enumerate(lis))
[(0,'a'),(1,'b'),(2,'c'),(3,'d')]
>>> list(enumerate(lis,reverse=True)
[('a',0),('b',1),('c',2),('d',3)]
>>>

----------
components: Build
messages: 361670
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: reverse parameter for enumerate()
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39596>
_______________________________________


More information about the New-bugs-announce mailing list