On Oct 16, 3:54 am, Terry Reedy <tjre...@udel.edu> wrote: > There is already an obvious standard way to do this. > > it = <whatever> > next(it) #toss first item > for item in it: > .... >
That fails if there is no first item. You're taking one corner case and saying there's an easy way to do it, which is more or less true, but you miss my point that I'm suggesting we make the general case easier. By giving iterators a default, overridable, __getitem__ that is just syntactic sugar for islice, they would share a slightly larger interface subset with the builtin container types. In a duck-typed language like python, that's almost always a good thing. You could use iterators in more situations which expect something more like a list. As long as it breaks no rationally existing code, I can think of no good reason why not to do this in a future python. -Dan -- http://mail.python.org/mailman/listinfo/python-list