handling boolean values from a c api

Gerhard Häring gh at ghaering.de
Sun Mar 23 19:45:59 EST 2003


* Bryan <belred1 at yahoo.com> [2003-03-23 16:37 -0800]:
> i have a function in python that returns a boolean.  i'm currently
> using PyInt_Check to verify the return value, but this limits me to
> integers and True/False (in 2.2).  is there an easy way to tell the
> boolean value of any aritrary object in 2.2? [...]

PyObject_IsTrue


Gerhard
-- 
mail:   gh at ghaering.de
web:    http://ghaering.de/





More information about the Python-list mailing list