Another Pyrex Question

Greg Ewing (using news.cis.dfn.de) me at privacy.net
Sun Mar 16 21:05:31 EST 2003


Ganesan R wrote:
> Is it possible to setup a
> class variable?. Say, some thing like
> 
> cdef class Shrubbery:
>     static cdef int count

No, but you don't really need it -- just use a
module-level variable, e.g.

cdef int Shrubbery_count

outside of the class definition.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list