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

noreply@sourceforge.net noreply@sourceforge.net
Mon, 25 Nov 2002 07:06:13 -0800


Bugs item #643358, was opened at 2002-11-25 04: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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: James Henstridge (jhenstridge)
>Assigned to: Michael Hudson (mwh)
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.

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

>Comment By: Michael Hudson (mwh)
Date: 2002-11-25 15:06

Message:
Logged In: YES 
user_id=6656

Yup.

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

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