[Python-Dev] Re: Re: Sets: elt in dict, lst.include

Charles G Waldman cgw@alum.mit.edu
2001年1月29日 12:35:58 -0600 (CST)


Greg Wilson writes:
 > This would allow multi-dimensional structures
 > (e.g. NumPy arrays) to do things like:
 > 
 > for (i, j, k) in array:		# please give me three indices
 > 
 > and:
 > 
 > for ((i, j, k), v) in array:	# three indices and value
And what if I had, for example, a 3-dimensional array where the values
are 3-tuples? Would "for (i,j,k) in array" refer to the indices or the
values?

AltStyle によって変換されたページ (->オリジナル) /