John Machin wrote:

reversed came later; returning an iterator rather than a list provides
more flexibility.

As in flexibility for the implementer, the day someone invents a sort algorithm that doesn't have to look at all source items before it starts producing output?

Because I fail to see how returning an object that supports forward iteration only is more flexible for the *user* than returning an object that supports random access, mutation, restartable iteration, *and* forward iteration.

</F>

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to