[issue39596] reverse parameter for enumerate()

Eric V. Smith report at bugs.python.org
Mon Feb 10 04:24:03 EST 2020


Eric V. Smith <eric at trueblade.com> added the comment:

You can already do this using existing composable tools, including:

>>> list((item, idx) for idx, item in enumerate(lis))
[('a', 0), ('b', 1), ('c', 2), ('d', 3)]
>>>

We won't be adding a parameter to enumerate in order add another way of doing this.

If you really want to pursue this, you should discuss it on the python-ideas mailing list and try to get the idea accepted there. But it really doesn't have any chance of being accepted.

----------
nosy: +eric.smith
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list