Robert Bradshaw wrote: > On May 11, 2008, at 2:50 AM, Greg Ewing wrote: > >> Will it be legal to do something like >> >> cdef class B(A(len=10)): > > No, I don't think the above would be allowed.
That would sidestep some problems, I suppose, although it would make it less of a general parameterised-types mechanism. Another thing bothers me a bit. Your simple little __getitem__ example is all very well, but a full-blown NumPy array with multiple dimensions and strides and whatnot is a rather complicated beast. Are you sure it will be possible to write a __getitem__ that deals with all that in its full generality while still providing the efficiencies you're after? What would such a __getitem__ implementation look like? Also, as well as accessing single items, there's slicing to consider. Is it going to be feasible to write a __getitem__ and a __setitem__ that work together such that things like a[i:j, k:l] = b[x, y, i:j, k:l] do the right thing efficiently? -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
