tp_getattrfunc, access members that are a list

From: Torsten Mohr (
Date: 06/07/04

Date: Mon, 07 Jun 2004 22:28:06 +0200


in the documentation and the examples that describe how to
make the members of a new type accessible it says that
i need to use the getattrfunc and setattrfunc if i want
to access members that are an array.

typedef struct {
  unsigned char d[8];
} pmod_obj;

Sadly i did not find any example on how to do this.

Can anybody describe me how i can access the array d[8]
as a list? I'd like to get AND set values in there.

Thanks for any hints,

Relevant Pages

  • Re: visibility matter on converting object to array
    ... i'll get an array having keys that from member variable's name ... i guessed "i can get public members but not protected, private, static ... Is it right way to access object members?(by converting to ...
  • Re: Properties
    ... Instead of properties I would prefer a full abstraction of record, array, ... members and privately implement it as another record with other members or ... private array of Character; ...
  • Re: Array Design
    ... ITOH it's pretty sure you are referencing an element in the array that you ... > When the application starts I initialise a state class, ... > I ask the user how many members to create. ... >>> have exceptions cropping up. ...
  • Re: extract items from list in single field
    ... Try using the Splitfunction to change the delimited string into an array. ... You would then loop through the members of the array and write one record to ...
  • Re: how to make a variable based on array length and member value
    ... I have an array full_arrayof an arbitrary number of transaction ... From the array I have created a new array years.uniq! ... what id like to do is take the new arrays members and use them as ... will fail, because you HAVE NOT YET WRITTEN THE CODE. ...