[Python-ideas] Fwd: [RFC] draft PEP: Dedicated infix operators for matrix multiplication and matrix power
M.-A. Lemburg
mal at egenix.com
Wed Mar 19 00:38:54 CET 2014
On 18.03.2014 21:58, Nick Coghlan wrote:
> On 18 Mar 2014 22:18, "M.-A. Lemburg" <mal at egenix.com> wrote:
>> [...matrix method slots space tradeoff...]
> [... need for implementing number methods even on non-number types ...]
> So a *lot* of types already have their PyNumberMethods slot allocated
> (including sequence types implemented in Python), and I'd like to expand
> that to include all sequence types, even those implemented in C.
>
> That makes the space trade-off here substantially less clear, particularly
> if matrix power ends up being added in the future (it has been dropped from
> the current PEP).
Ok, point taken :-)
> I accept that adding the new slots to PyNumberMethods is more conceptually
> coherent than I thought, though. There's also the fact that we already mess
> about populating different slots for pragmatic reasons that have nothing to
> do with conceptual integrity :)
Perhaps something to revisit for Python 4 ?!
The refactoring could lead to some space savings, untangle code and
make the C API easier to understand.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Mar 19 2014)
>>> Python Projects, Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2014-03-29: PythonCamp 2014, Cologne, Germany ... 10 days to go
2014-04-09: PyCon 2014, Montreal, Canada ... 21 days to go
::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
More information about the Python-ideas
mailing list