[Pyrex] extension type attributes
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Jun 1 03:40:26 CEST 2009
Mark Ellis wrote:
> Or you could implement __setattr__ and __getattr__ methods for your
> class, in which case attributes can be whatever you want. These methods
> could then default to accessing a dict object stored as part of the C
> class struct, to act as 'normal' python object attributes.
Possible, although a Python subclass of such a class
would behave a little oddly, since its attributes
wouldn't show up in the usual __dict__.
--
Greg
More information about the Pyrex
mailing list