Discussion: new math operators

Bjorn Pettersen bjorn at roguewave.com
Sat Jul 22 00:33:45 EDT 2000


Huaiyu Zhu wrote:
[snip]
> So, perhaps we need to summarize the first round and concentrate on the
> remaining issues.  Here's my personal summary of the firs round (highly
> opinionated)
> 
> ========================================================================
> 
> We agree that there are two types of operators, matrixwise and elementwise.

Sure, but you're forgetting that many of us don't care enough about the
distinction that we'd like to see the Python core changed...

> We agree that they should have completely identical syntactic properties.
> They behave identically on numbers.

By the first sentence, I assume you mean they should have the same
precedence and associativity as their normal counterparts? The second
sentence means that 5 .+ 3 == 8?

> We agree that the new operators, whether elementwise or matrixwise, should
> not have default meaning on objects other than numbers.

I have seen no agreement on this, and I can only assume that if they're
made available new and "useful" meanings would be found for all of
lists, tuples, and dictionaries.  This has certainly been the case in
other languages.

-- bjorn

ps: did you read the APL/J pages?




More information about the Python-list mailing list