A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-January/012293.html below:

[Python-Dev] RE: Python-Dev digest, Vol 1 #1124

[Python-Dev] RE: Python-Dev digest, Vol 1 #1124 - 13 msgsGreg Wilson gvwilson@ca.baltimore.com
Mon, 29 Jan 2001 14:38:50 -0500
> Greg Wilson writes:
>  > This would allow multi-dimensional structures
>  > (e.g. NumPy arrays) to do things like:
>  >     for (i, j, k) in array:
>  > and:
>  >     for ((i, j, k), v) in array:	# three indices and value

> Charles Waldman asks:
> 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?

Greg Wilson writes:
That would be up to the module's implementer --- my idea was to have
the 'for' loop provide more information to the object being iterated
over, so that it could "do the right thing" (just as objects do right
now with "x[i]").

Greg



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4