[Cython] array assignment
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Oct 12 02:10:22 CEST 2008
Robert Bradshaw wrote:
> Yes, the
> arrays as they are now have a few warts (like using them in loops)
> but I think it's too useful to disable altogether.
You could get the same effect in a much less misleading
way using
cdef int data[] = [1, 2, 3, 4]
cdef int *a = data
Now it's perfectly clear that a is pointing to something
stack-allocated. EIBTI.
--
Greg
More information about the Cython-dev
mailing list