Madison May added the comment: Reversed doesn't make sense for all iterables.
>>> a = set([1, 2, 3]) >>> a = iter(a) # No error >>> a = reversed(a) # Not typically desirable The point is that not all iterables are necessarily ordered. And a reversed function shouldn't operate on unordered types. Here's the relevant section of the docs for reversed(): reversed(seq) Return a reverse iterator. seq must be an object which has a __reversed__() method or supports the sequence protocol (the __len__() method and the __getitem__() method with integer arguments starting at 0). Your point about the sorted()'s behavior seems like a fair one, though. Perhaps it does make sense to support implicit conversion to lists for generator objects passed to reversed(). ---------- nosy: +madison.may _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18826> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com