Adding a Par construct to Python?
castironpi at gmail.com
Thu May 28 19:53:17 CEST 2009
On May 27, 11:07 pm, Steven D'Aprano <st... at REMOVE-THIS-
> 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?
More information about the Python-list