pairs from a list

Peter Otten __peter__ at web.de
Tue Jan 22 14:58:37 EST 2008


Arnaud Delobelle wrote:

> On Jan 22, 4:10 pm, Alan Isaac <ais... at american.edu> wrote:
> 
>> <URL:http://bugs.python.org/issue1121416>
>>
>> fwiw,
>> Alan Isaac
> 
> Thanks.  So I guess I shouldn't take the code snippet I quoted as a
> specification of izip but rather as an illustration.

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)".
"""

and the bug report with Raymond Hettinger saying

"""
Left the evaluation order as an unspecified, implementation
specific detail.
"""

is about zip(), not izip().

Peter



More information about the Python-list mailing list