[Python-Dev] List comprehensions
Thu, 13 Jul 2000 07:27:02 -0500
Skip Montanaro wrote:
> Paul> [for x: if y(x): for z: (x,y,z)]
> Agreed, however, your use of colons connotes the following to me
> l = 
> for x in something:
> if y(x):
> for z in something_else:
> return l
Yes, that's right. I forgot the "in something" and "in something_else"
parts but your interpretation was still correct (a fault tolerant
[for x in something: if y(x): for z in something_else: (x,y,z)]
Paul Prescod - Not encumbered by corporate consensus
Simplicity does not precede complexity, but follows it.