[ Terry Jones ] [ ... ]
> Also consider this solution from O'Reilly's Python Cookbook (2nd Ed.) p705 > > def chop(iterable, length=2): > return izip(*(iter(iterable),) * length) Is this *always* guaranteed by the language to work? Should the iterator returned by izip() change the implementation and evaluate the underlying iterators in, say, reverse order, the solution would no longer function, would it? Or is it something the return value of izip() would never do? (I am just trying to understand the solution, not criticize it. Took a while to parse the argument(s) to izip in the example). ivr -- <+Kaptein-Dah> igorr: for få parenteser <+Kaptein-Dah> igorr: parenteser virker som lubrication under iterasjon <+Kaptein-Dah> igorr: velkjent
-- http://mail.python.org/mailman/listinfo/python-list