Ammar Askar <[email protected]> added the comment:
What is the use case for this? You seem to want `enumerate` to return (item,
index) instead of (index, item) when `reverse=True`? You can achieve this
yourself easily a custom generator:
>>> def swapped_enumerate(l):
... for idx, item in enumerate(l):
... yield item, idx
...
>>> list(swapped_enumerate(lis))
[('a', 0), ('b', 1), ('c', 2), ('d', 3)]
----------
nosy: +ammar2
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39596>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com