[Pyrex] [Cython-dev] cdef private class ... ?

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Jan 31 00:31:07 CET 2008


Stefan Behnel wrote:

> Not quite, if you use a keyword (or modifer), you could check at compile time
> that the type does not appear in the associated .pxd, i.e. that it cannot be
> cimported.

That's not the point. The point is that making the class
private would prevent *any* use of it from another
extension module, whether Pyrex or C, without modifying
the original module and recompiling it.

Currently you can always declare a type as an external
extension type and use or subclass it, whether it was
declared in a .pxd or not. Removing the entry from the
module dict would prevent that.

--
Greg



More information about the Pyrex mailing list