Arnaud Delobelle wrote:
(...)
> 
> from itertools import chain
> 
> def overlaps(lst):
>     bounds = chain(*(((x[1],i), (x[2], i)) for i,x in enumerate(lst)))

imho, this is a uselessly painful equivalent of

       bounds = ((x[k],i) for i,x in enumerate(lst) for k in (1,2))

Cheers, BB
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to