[Python-Dev] Re: Candidate Itertools
dave at boost-consulting.com
Thu Jun 24 07:36:05 EDT 2004
Aahz <aahz at pythoncraft.com> writes:
>> def pairswap(iterable):
>> return ((b,a) for a,b in iterable)
> -1 -- too trivial.
Yeah, shouldn't any sequence-returning functions in itertools really
be returning an iterator adaptor? After all, what if iterable is
reading from a file?
What we need is a lazy views library.
More information about the Python-Dev