Another Pyrex Question

Ganesan R rganesan at myrealbox.com
Fri Mar 14 07:57:06 CET 2003


Assume a class definition like this

cdef class Shrubbery:
    cdef int width, height

Here width and height are attributes of Shrubbery. Is it possible to setup a
class variable?. Say, some thing like

cdef class Shrubbery:
    static cdef int count
    cdef int width height

By the way, Pyrex is simply amazing. I attempted to use SWIG earlier, but
writing an object oriented interface in SWIG is not very easy. Pyrex makes
it really, really easy. 

Ganesan

-- 
Ganesan R





More information about the Python-list mailing list