Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ed6dff

Browse files
committed
As discussed on python-dev, revised docs to note that
PyObject_IsTrue() can have an error result. Also, added missing docs for PyObject_Not(). Will backport.
1 parent 1475c49 commit 2ed6dff

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Doc/api/abstract.tex

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,14 @@ \section{Object Protocol \label{object}}
310310
\begin{cfuncdesc}{int}{PyObject_IsTrue}{PyObject *o}
311311
Returns \code{1} if the object \var{o} is considered to be true, and
312312
\code{0} otherwise. This is equivalent to the Python expression
313-
\samp{not not \var{o}}. This function always succeeds.
313+
\samp{not not \var{o}}. On failure, return \code{-1}.
314+
\end{cfuncdesc}
315+
316+
317+
\begin{cfuncdesc}{int}{PyObject_Not}{PyObject *o}
318+
Returns \code{0} if the object \var{o} is considered to be true, and
319+
\code{1} otherwise. This is equivalent to the Python expression
320+
\samp{not \var{o}}. On failure, return \code{-1}.
314321
\end{cfuncdesc}
315322

316323

0 commit comments

Comments
 (0)