Problems sending list/tuple to a C extension.

Christian Seberino seberino at spawar.navy.mil
Wed Nov 26 00:45:35 EST 2003


Martin

Thanks for your email.  I understand now.  I got it
to work.  All is well.  

Chris

martin at v.loewis.de (Martin v. Löwis) wrote in message news:<m365h975q4.fsf at mira.informatik.hu-berlin.de>...
> seberino at spawar.navy.mil (Christian Seberino) writes:
> 
> > I think you misunderstood my question.  My invocation of PyArg_ParseTuple
> > was flawless EXCEPT for checking return value.
> > 
> > ALL I did was check return value and then code worked fine!!!
> > 
> > *This* is what was exceedingly strange.
> 
> When you say "It worked fine", you mean "It raises an exception", right?
> Because you did not, actually, pass a tuple to the call.
> 
> If you had passed a tuple to the call, instead of passing an integer,
> it would have worked even without the check for an error return. It
> was only because you made an error *in Python* that the failure to
> check for errors in C made any difference.
> 
> Or are you asking "Why do I need to check for errors in Python code if
> the Python code does have errors?" I couldn't quite imagine why you
> would ask this question: How else could Python possibly communicate
> the error to the Python code, except by returning an error????
> 
> Regards,
> Martin




More information about the Python-list mailing list