[Python-ideas] Fwd: [RFC] draft PEP: Dedicated infix operators for matrix multiplication and matrix power

Oleg Broytman phd at phdru.name
Fri Mar 14 20:00:09 CET 2014


On Fri, Mar 14, 2014 at 11:53:47AM -0700, Guido van Rossum <guido at python.org> wrote:
> On Fri, Mar 14, 2014 at 11:41 AM, Antony Lee <antony.lee at berkeley.edu>wrote:
> > A simple suggestion: what about defining the special methods as __at__,
> > __rat__, __iat__ (@) and __atat__, __ratat__, __iatat__ (@@)?  This make
> > the operator more "neutral" -- it make it sound less "wrong" to overload it
> > for something else that matrix multiplication (which is certainly an
> > important topic, but even though I use numpy quite a lot, I don't actually
> > use it at all for linear algebra (in fact I use elementwise multiplications
> > much more often) -- so counting imports of numpy is a somewhat biaised
> > metric for counting users of matrix multiplication).
> 
> Ratatatatatat! :-)

   Is this the sound made by matrices being multiplied? ;-)

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-ideas mailing list