On 9/01/21 10:19 am, Ram Rachum wrote:
In short, I want `reversed(itertools.chain(x, y, z))` that behaves like
`itertools.chain(map(reversed, (z, y, x)))`.
I think you mean `itertools.chain(*map(reversed, (z, y, x)))`
You can get this with
itertools.chain(*map(reversed, reversed(t)))
Making `reversed(itertools.chain(x, y, z))` do this would be a
backwards incompatible change.
Also it's hard to see how it could be made to work, because the
argument to reversed() necessarily has to be a sequence, not an
iterator.
--
Greg
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/GONEREIJDJPSS7GVKTXAF3ABB446UAYH/
Code of Conduct: http://python.org/psf/codeofconduct/