I'm not sure if this is a bug in 0.17 beta or not. But something is not working.
Default-constructed attributes in an extension definition appear to work (though I can't see where they are documented on the site…) So this works: ----test.h -------- #include <vector> struct Attributes { std::vector<int> v; }; -----test.pyx------ from libcpp.vector cimport vector cdef extern from "test.h": cdef cppclass Attributes: vector[int] v cdef class Test: cdef Attributes a def __cinit__(self, list x): self.a.v = x However, if I try to put the templated attribute in directly: ----test2.pyx------ from libcpp.vector cimport vector cdef class Test: cdef vector[int] v def __cinit__(self, list x): self.v = x cython compiles it fine, but I get an error in the cpp compilation: test2.cpp:722:23: error: expected a type new((void*)&(p->v)) std::vector(); So it looks like it's doing the funky in place construction, but not getting the template parameters in there… Should this work? Cheers, Brett _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel