[Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

Benjamin Peterson benjamin at python.org
Mon Apr 7 23:34:32 CEST 2014



On Mon, Apr 7, 2014, at 14:33, Alexander Belopolsky wrote:
> On Mon, Apr 7, 2014 at 5:23 PM, Benjamin Peterson
> <benjamin at python.org>wrote:
> 
> > I can understand why creating new array types is good fun, but how is
> > creating a new struct helpful?
> >
> 
> We can start by reviewing the reasons for having separate
> PyNumber/PySequence/PyMappingMethods
> structures.  I believe that one of the reasons is that many types need to
> allocate only one of the three.  Numpy arrays, IIRC, allocate all three. 
> A
> dedicated PyArrayMethods struct can replace some if not all of these
> allocations.

I can't say it seems like a terrible important thing to optimize to me.


More information about the Python-Dev mailing list