> It's not obvious why it should.
I'd say that it's not obvious why it shouldn't. The "weakproxy" type currently supports every single "PyNumberMethods" slot *except* matrix multiplication: see
https://github.com/python/cpython/blob/bf94cc7b496a379e1f604aa2e4080bb70ca4020e/Objects/weakrefobject.c#L610-L645
It seems likely that this was an unintentional omission when matrix multiplication was added. I can't think of any good reason to support all but one (well, two, including the in-place method) of those PyNumberMethods. Supporting all of them gives a (conceptually) smaller, simpler object.
I think this is a consistency bug that should be fixed. |