Sequence Protocol, assign item

Torsten Mohr tmohr at s.netic.de
Thu Sep 2 16:57:57 EDT 2004


Hi everybody,

at the moment i try to write an extension module in C
and i implement the sequence protocol for the data type
i created.  Reading values works fine.

But assigning a value does not work correctly, has anybody
got an example for that?

The function type i have to create is intobjargproc, so
i need to return an "int".  Returning 0 or 1 does not seem
to work.

What can the return value be, what can i return her in case
of failure and in case od success?

I don't use any INCREF or DECREF inside my function, do i need
to do that for some parameters?  The exact error message i
don't have available at the moment, i'll bring that one tomorrow,
but it looks to me that at the cleanup at the end of the script
an exception is thrown somewhere.


Best regards,
Torsten.






More information about the Python-list mailing list