C-API PyObject_Call

Steve Holden steve at holdenweb.com
Tue Mar 16 13:14:04 EDT 2010


moerchendiser2k3 wrote:
> In one case I have to check the return value of PyObject_Call, and if
> its not of the correct return value,
> I throw an exception, but I just get a simple output:
> 
> TypeError: Expected an instance of XYZ, no int.
> 
> instead of
> 
> Traceback (most called...)
> TypeError: in line 3, file test.py: expected an instance of XYZ, no
> int...

Could we perhaps see a little bit more of the code? Are you throwing the
exception from within your C code or from the Python calling environment
with a raise statement?

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
See PyCon Talks from Atlanta 2010  http://pycon.blip.tv/
Holden Web LLC                 http://www.holdenweb.com/
UPCOMING EVENTS:        http://holdenweb.eventbrite.com/




More information about the Python-list mailing list