Hi all, f and g below should behave identically, shouldn't them?
import cython cdef struct Point: int x int y def f(): return Point(x=10, y=10) def g(): cdef Point p = Point(x=10, y=10) return p But then f won't compile: Cannot interpret dict as type 'Python object' DictNode.coerce_to decides it can't coerce a CStructOrUnionType to a python object, but the underlying struct type does know how to coerce a struct into a dict. Here is an old post stating the same, although I don't know if it ever entered the bug tracker. https://www.mail-archive.com/cython-dev@codespeak.net/msg09121.html Best regards -- Carlos _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel