C API - tp_getattro and tp_methods
williams.jasonscott at gmail.com
williams.jasonscott at gmail.com
Mon Apr 24 16:50:52 EDT 2006
André Malo wrote:
> tp_getattro is like defining __getattribute__, i.e. it gets called on every
> attribute read access. You can use PyObject_GenericGetAttr inside the
> function to find predefined attributes before applying your own rules.
Thanks for the reply. I see and was afraid of that, I don't have a
predefinded list of attributes. I want to get them from the C library
as needed. Is there another way I should be accessing the data from my
C lib since it isn't known at compile time?
thanks again~
More information about the Python-list
mailing list