On PEP 322 (ireverse)
roy at panix.com
Wed Oct 29 18:10:16 CET 2003
"Terry Reedy" <tjreedy at udel.edu> wrote:
> As I suggested elsewhere, make iter() the type object for iterator.
> Then iter.reversed is closely parallel to list.sorted.
I've got a question about list.sorted. I assume it's just a list that's
initialized to have its elements sorted when it's created? We're not
talking about some new magic container type which keeps its elements
sorted all the time?
In other words, I'm assuming that
l = list.sorted ((1, 2, 5, 3))
will print [1, 2, 3, 5, 4], right?
More information about the Python-list