[Python-Dev] re: Sets BOF / for in dict

Ka-Ping Yee ping@lfw.org
Mon, 5 Feb 2001 11:04:16 -0800 (PST)


On Sun, 4 Feb 2001, Greg Wilson wrote:
> Question: would the current proposal allow NumPy arrays (just as an
> example) to support both:
> 
>     for index:value in numPyArray:
> 
> where 'index' would get tuples like '(0, 3, 2)' for a 3D array, *and*
> 
>     for (i, j, k):value in numPyArray:

Naturally.  Anything that could normally be bound on the left
side of an assignment (or current for loop) could go in the
spot on either side of the colon.


-- ?!ng