Not fully OO ?

Colin J. Williams cjw at ncf.ca
Sat Sep 20 11:14:33 EDT 2008


Fredrik Lundh wrote:
> Colin J. Williams wrote:
> 
>> "foreach: for x in array: statements
>>
>> Loops over the array given by array. On each iteration, the value of 
>> the current element is assigned to x and the internal array pointer is 
>> advanced by one. "
>>
>> This could be a useful addition to Python.
> 
> for-in could be a useful addition to Python?  looks like Guido's used 
> his time machine again, then, since it's been around since the pre-1.0 
> days:
> 
>     http://www.python.org/doc/ref/for.html
> 
> </F>
> 
Thanks.

for_stmt  	::=  	"for" target_list "in" 
expression_list  ":" suite
		["else" ":" suite]

Colin W.



More information about the Python-list mailing list