On Feb 5, 5:22 am, [EMAIL PROTECTED] wrote:
> Some iterables and control loops can be multithreaded. Worries that
> it takes a syntax change.
>
> for X in A:
> def f( x ):
> normal suite( x )
> start_new_thread( target= f, args= ( X, ) )
>
> Perhaps a control-flow wrapper, or method on iterable.
>
> @parallel
> for X in A:
> normal suite( X )
>
> for X in parallel( A ):
> normal suite( X )
>
I would propose "for X IN A" for parallel and remain "for X in A" for
sequential.
BTW for fortress lang I had proposed "for X <- A" and "for X <= A" for
sequential/parallel instead of current "for X <- seq(A)", "for X <-
A", mb they will implement my way instead.
--
http://mail.python.org/mailman/listinfo/python-list