[Python-bugs-list] [ python-Bugs-643358 ] comments about PyObject_IsTrue wrong

noreply@sourceforge.net noreply@sourceforge.net
Sun, 24 Nov 2002 20:20:44 -0800


Bugs item #643358, was opened at 2002-11-25 12:20
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=643358&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: James Henstridge (jhenstridge)
Assigned to: Nobody/Anonymous (nobody)
Summary: comments about PyObject_IsTrue wrong

Initial Comment:
The comments in the abstract.h header about
PyObject_IsTrue and PyObject_Not appear to be
incorrect.  They state that:

> This function always succeeds.

It is possible for an exception to be raised by this
call (in which case it returns -1), if the object's
implementation of __nonzero__ or __len__ causes an error.

The comment should state that the function can fail, in
which case -1 is returned.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=643358&group_id=5470