20 Aug
2008
20 Aug
'08
3:37 p.m.
Andrew Toulouse wrote:
If I'm understanding you correctly, this would address something I've wanted list comprehensions to do for a little while:
[x for x in range(0,10) until greaterthanN(4,x)]
Note that you can do something like
def yet(b) : if b : raise StopIteration
list(x for x in range(0,10) if not yet(x>4)) [0, 1, 2, 3, 4]
Cheers, BB