Andy Bensky (email@example.com)
Mon, 7 Mar 1994 12:35:39 +0800
I am told that getattr() is the appropriate and fast way of getting
attributes of a class instance from within a C program. Since this
functions always returns an object * type it follows that if the attribute
is a simple string it is necessary to use getargs() to extract the string
from the object returned by getattr(), or is there some other recommended
method for getting the string value? Is this also required if the attribute
returned is a complex object such as a list object?
My specific question is, is it necessary to use getargs() with a format string
of "O" to extract a list object from a value returned by getattr() or is the
value returned sufficient for use in functions such as addlistitem()?