Re: [Python-ideas] Calling a function of a list without accumulating results

27 Sep
2007
27 Sep
'07
11:56 p.m.
Hi Arnaud
| If you want to do it like this, why not do it explicitly: | | def exhaust(iterable): | for i in iterable: pass | | Then you can write: | | exhaust(f(x) for x in mylist)
Thanks - that's nice. It also gives me the generality I wanted, which was the ability to use the full LC/genexp "for..." syntax, which I should have emphasized more, including in the subject of the thread.
Terry
5730
Age (days ago)
5730
Last active (days ago)
0 comments
1 participants
participants (1)
-
Terry Jones