Adding a Par construct to Python?
Diez B. Roggisch
deets at nospam.web.de
Mon May 18 06:08:26 EDT 2009
Steven D'Aprano wrote:
> On Sun, 17 May 2009 20:34:00 +0200, Diez B. Roggisch wrote:
>>>> My math-skills are a bit too rusty to qualify the exact nature of the
>>>> operation, commutativity springs to my mind.
>>> And how is reduce() supposed to know whether or not some arbitrary
>>> function is commutative?
>> I don't recall anybody saying it should know that - do you? The OP wants
>> to introduce parallel variants, not replace the existing ones.
> Did I really need to spell it out? From context, I'm talking about the
> *parallel version* of reduce().
>From what context - your permanent arguing that there is no way for reduce
to determine if the passed operation is associative (which no one claimed
to be possible, nor to be needed)? No, from *that* context it wasn't clear.
It's the programmer who decides which version to use.
More information about the Python-list