Language Enhancement Idea to help with multi-processing (your opinions please)

Chris Angelico rosuav at gmail.com
Thu Oct 13 09:09:13 EDT 2011


On Thu, Oct 13, 2011 at 11:35 PM, Martin P. Hellwig
<martin.hellwig at gmail.com> wrote:
> What I would expect to happen that all statements within the ooo block may
> be executed out
> of order. The block itself waits till all statements are returned before
> continuing.
>

In a statically-typed language such as C, this can be done by an
optimizing compiler, without any hints from the programmer. But in
Python, what you're looking for is either a guarantee from the
programmer that none of the statements has a side effect that affects
any other, or that you're prepared to wear it and have a horrendous
debugging job if anyone monkey-patches your code or you do anything
that makes a, b, or c into something more complex than an integer.

ChrisA



More information about the Python-list mailing list