[Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Apr 8 00:19:09 CEST 2014
Alexander Belopolsky wrote:
> 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.
That much is probably true.
> Numpy arrays, IIRC, allocate all three. A dedicated PyArrayMethods
> struct can replace some if not all of these allocations.
I don't see how. NumPy arrays allocate all three because
they override just about every method in existence. Adding
another struct isn't going to eliminate the need for the
existing ones.
--
Greg
More information about the Python-Dev
mailing list