Adding a Par construct to Python?

Aaron Brady castironpi at
Thu May 28 19:53:17 CEST 2009

On May 27, 11:07 pm, Steven D'Aprano <st... at REMOVE-THIS-> wrote:
> On Wed, 27 May 2009 12:58:02 +0000, Albert van der Horst wrote:
> >>And how is reduce() supposed to know whether or not some arbitrary
> >>function is commutative?
> > Why would it or need it? A Python that understands the ``par'' keyword
> > is supposed to know it can play some tricks with optimizing reduce() if
> > the specific function is commutative.
> Fine. Move the smarts out of reduce() into the compiler. How is the
> compiler supposed to know if an arbitrary function is commutative?

Unit testing.

More information about the Python-list mailing list