On 14 Sep 2008, at 10:25, Cliff Wells wrote:
Now say you want to write that inline with a for-expression:
for J in I: for j in J: YIELD j )
That won't work because the j's will be accumulated in the inner loop and the outer loop won't accumulate anything, therefore returning an empty iterable.
How about this way instead (since for-loop is now an expression):
'-'.join( for j in ( for J in I: YIELD J ): YIELD j )
After you've had a good night's sleep and when you look at this again, you'll definitely think that you were too hasty in replying :)