[issue18826] reversed() requires a sequence - Could work on any iterator?

Donald Stufft report at bugs.python.org
Sat Aug 24 21:29:51 CEST 2013


Donald Stufft added the comment:

As an additional note this works how I would expect it to work if you're using sorted() instead of reversed() which I think is a stronger point in the favor of making reversed() work this way as well.

>>> sorted(x for x in [1, 2, 3])
[1, 2, 3]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18826>
_______________________________________


More information about the Python-bugs-list mailing list