[Python-ideas] Infix matrix-multiply, but not general infix operators?

Sturla Molden sturla.molden at gmail.com
Tue Mar 25 07:05:04 CET 2014


Chris Angelico <rosuav at gmail.com> wrote:

> where "as operator", instead of specifying the name to bind to,
> specifies that it be something other than a name. (Preferably, it
> should use a keyword, rather than "operator", which is a valid name.)
> This would go immediately under future statements, and would affect
> the compilation of that module: any instance of the word "spam" is now
> a keyword operator, so the above would be invalid. I'm still not
> convinced it would be a good thing, but this at least gives a
> per-module way to create operators.

Cluttering the syntax with arbitrary operators is a very bad idea, IMHO.

Sturla



More information about the Python-ideas mailing list