[Pyrex] PyStringObject cannot be subclassed in Cython/Pyrex

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jan 29 02:00:14 CET 2008


Stefan Behnel wrote:

> I tried subclassing PyStringObject in Pyrex and noticed that it cannot work
> due to the way the type is set up by Python.

This isn't just a problem for Pyrex, it's a problem for any
C code that wants to add members to its struct. You're
pretty much out of luck.

--
Greg



More information about the Pyrex mailing list