trouble with the C API

Stefan Seefeld seefelds at magellan.umontreal.ca
Mon Aug 21 12:11:33 EDT 2000


hi,

I'm writing a C module for a python tool I'm working
on and I'm having trouble with the C API. What is the
distinction between the PyDict_xxx abd the PyMapping_xxx
functions ? I defined (in python) my own type containing
the methods __setitem__, haskey, etc. to make it 'dictionary
conformant'. Now I want to access and modify the content.
The key is a list of strings (which I map to a tuple on the
fly). There is no PyMapping_GetItem call for keys other than
strings. (but the equivalent dict function exists !).
Unfortunately, it appears I can't mix Dict and Mapping functions
since they operate on different slices of the object. At least
I can't access an item via a dict call which I set via a mapping 
call etc....

Any help would be appreciated,

	Stefan
_______________________________________________________              
              
Stefan Seefeld
Departement de Physique
Universite de Montreal
email: seefelds at magellan.umontreal.ca

_______________________________________________________

      ...ich hab' noch einen Koffer in Berlin...



More information about the Python-list mailing list