Adding a Par construct to Python?

Steven D'Aprano steve at
Sun May 17 10:07:33 EDT 2009

On Sun, 17 May 2009 05:05:03 -0700, jeremy wrote:

> From a user point of view I think that adding a 'par' construct to
> Python for parallel loops would add a lot of power and simplicity, e.g.
> par i in list:
>     updatePartition(i)
> There would be no locking and it would be the programmer's
> responsibility to ensure that the loop was truly parallel and correct.

What does 'par' actually do there?

Given that it is the programmer's responsibility to ensure that 
updatePartition was actually parallelized, couldn't that be written as:

for i in list:

and save a keyword?


More information about the Python-list mailing list