[Cython] [cython-users] Recommendations for efficient typed arrays in Cython?

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Feb 5 00:17:43 CET 2013


Sturla Molden wrote:
> I was replying to a Cython 
> user who thought anything declared 'cdef' was reference counted

That's a matter of user education. We can't use syntax to
address every possible misconception a user might have.

> "cdef" refers to storage in the generated C, not to the semantics of 
> Cython. But how and where variables are stored in the generated C is an 
> implementation detail.

Not entirely -- you can't access a cdef attribute of an
extension type using getattr(), for example. And external
C code only has direct access to cdef variables and
attributes.

-- 
Greg


More information about the cython-devel mailing list