PEP 276 -- What else could iter(5) mean?
James_Althoff at i2.com
James_Althoff at i2.com
Wed Mar 6 18:05:14 EST 2002
[Bernhard Herzog]
> That's not quite right, I think :)
>
> [f(x)
> for x in range((4 in range(3)) in range((2 in range(3))))
> if x in range((x+1 in range(x*2)))]
>
> would me more like it (but it's late so there may still be a mistake :) )
Thanks (I think <wink>).
[James Althoff]
> Can you suggest a less contrived example that might be a problem?
[Bernhard Herzog]
> x, = 1
>
> would assign 0 to x instead of raising an error.
Agreed. Note that this example has been in the PEP from the beginning.
Jim
More information about the Python-list
mailing list