On Thu, Feb 17, 2011 at 08:29:41AM -0500, W. Trevor King wrote: > cpdef struct Foo: > cpdef public int intA > cpdef readonly int intB > cdef void *ptr
Oops, for consistency with classes, the variables declarations should read `cdef public` and and `cdef readonly`. Perhaps `cdef struct` too, to match `cdef class`? I get a bit confused, because for some things (functions, methods) `cpdef` adds a Python interface. For others (attributes) it's `cdef public/readonly`. There are even some things (classes), where a plain `cdef` is enough to provide a Python interface. Perhaps I am just missing some subtle distinction between the effects of the various incantations? -- This email may be signed or encrypted with GPG (http://www.gnupg.org). The GPG signature (if present) will be attached as 'signature.asc'. For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy My public key is at http://www.physics.drexel.edu/~wking/pubkey.txt
pgpNmFAslJJpG.pgp
Description: PGP signature
_______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel