Discussion: new operators for numerical computation

Tim Hochberg tim.hochberg at ieee.org
Thu Jul 20 10:39:02 EDT 2000


aahz at netcom.com (Aahz Maruch) writes:

> In article <Pine.LNX.4.10.10007191505070.1129-100000 at rocket.knowledgetrack.com>,
> Huaiyu Zhu  <huaiyu_zhu at yahoo.com> wrote:
> >
> >        matrix          element      names (with prefix m or e)
> >          +               .+            add
> >          -               .-            sub
> 
> I am strongly opposed to operators of the form ".+".  What happens if
> take an expression of the form "5.+matrix"?  No, that goes against the
> Python rule of having zero ambiguity.

Note that if .+, etc are matrix operations, there is no ambiguity
since (5.)+A, etc. is not a legal expression, so the only
interpretation is 5.(+A). Still it looks confusing. I think we should
consider Konrad's suggestion of (*) or something similar.

-tim



More information about the Python-list mailing list