Hi Larry I actually feel this is a bad idea, (that is making list() a method of all iterators) because quite often iterators are created that don't end.
What happens then, is you have a method that will intentionally cause you to run out of memory or you exclude it from such iterators (creating inconsistancies in a standard protocol. Ok you can do the same silly thing with list (infiniteiterator) but a list() method on an iterator is just plain wrong in such a circumstance, don't you think Regards Tim On Mar 31, 6:07 am, Larry Riedel <larryrie...@gmail.com> wrote: > I see list(x.f()) as like x.f().iter().list(), where "list()" > is a method of all "iterator" objects, and "iter()" is a method > of all "iterable" objects, and whatever object is returned by > x.f() is of a type which conforms to the "iterable" interface. > I am not saying this is the way things /should/ be, but if it > was, it would make sense to me. > > Larry -- http://mail.python.org/mailman/listinfo/python-list