On May 4, 2009, at 11:33 AM, Stéfan van der Walt wrote: > Hi all, > > Is there a way to tell Cython if you are using a homogeneous list? > E.g. > > cdef list[int] my_list > > my_list.append(1) > my_list.append(2) >
No, there's not. It would be nice, but it would be hard to control what people stick in the list (e.g. if you pass it off to another routine). You might want to look at using NumPy arrays, which can store lists of actual c ints, etc. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
