pairs from a list
Raymond Hettinger
python at rcn.com
Tue Jan 22 15:21:54 EST 2008
[Peter Otten]
> You can be bolder here as the izip() docs explicitly state
>
> """
> Note, the left-to-right evaluation order of the iterables is
> guaranteed. This makes possible an idiom for clustering a data series into
> n-length groups using "izip(*[iter(s)]*n)".
> """
. . .
> is about zip(), not izip().
FWIW, I just added a similar guarantee for zip().
Raymond
More information about the Python-list
mailing list