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

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



On Mon, Apr 7, 2014, at 14:22, Alexander Belopolsky wrote:
> On Mon, Apr 7, 2014 at 1:11 PM, Benjamin Peterson <benjamin at python.org>
> wrote:
> >
> > > We can populate that struct with array-specific alternatives for
> > > PySequence/PyMappingMethods and eliminate the need for dynamically
> > > created array types to allocate those.
> >
> > Why would we want to do that?
> 
> I assume "that" means "create array types dynamically."  There are many
> reasons to do that in modern array implementations.  See for example
> ctypes.  A more practical reason however is that I
> believe PySequence/PyMappingMethods are cloned whenever a subclass of a
> sequence/mapping type is created.  For better or worse, subclassing of
> numpy arrays is a popular sport these days.

I can understand why creating new array types is good fun, but how is
creating a new struct helpful?


More information about the Python-Dev mailing list