[Python-checkins] python/dist/src/Doc/api concrete.tex, 1.25.10.9,
1.25.10.10
montanaro at users.sourceforge.net
montanaro at users.sourceforge.net
Thu Jul 29 04:29:26 CEST 2004
Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13933
Modified Files:
Tag: release23-maint
concrete.tex
Log Message:
backport relevant bits of the bool api docs
Index: concrete.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v
retrieving revision 1.25.10.9
retrieving revision 1.25.10.10
diff -C2 -d -r1.25.10.9 -r1.25.10.10
*** concrete.tex 23 Jul 2004 14:51:06 -0000 1.25.10.9
--- concrete.tex 29 Jul 2004 02:29:24 -0000 1.25.10.10
***************
*** 190,193 ****
--- 190,226 ----
+ \subsubsection{Boolean Objects \label{boolObjects}}
+
+ Booleans in Python are implemented as a subclass of integers. There
+ are only two booleans, \constant{Py_False} and \constant{Py_True}. As
+ such, the normal creation and deletion functions don't apply to
+ booleans. The following macros are available, however.
+
+ \begin{cfuncdesc}{int}{PyBool_Check}{PyObject* o}
+ Returns true if \var{o} is of type \cdata{PyBool_Type}.
+ \versionadded{2.3}
+ \end{cfuncdesc}
+
+ \begin{cvardesc}{PyObject*}{Py_False}
+ The Python \code{False} object. This object has no methods. It needs to
+ be treated just like any other object with respect to reference counts.
+ \end{cvardesc}
+
+ \begin{cvardesc}{PyObject*}{Py_True}
+ The Python \code{True} object. This object has no methods. It needs to
+ be treated just like any other object with respect to reference counts.
+ \end{cvardesc}
+
+ \begin{cfuncdesc}{int}{PyBool_Check}{PyObject* o}
+ Returns true if \var{o} is of type \cdata{PyBool_Type}.
+ \versionadded{2.3}
+ \end{cfuncdesc}
+
+ \begin{cfuncdesc}{int}{PyBool_FromLong}{long v}
+ Returns \constant{Py_True} or \constant{Py_False} depending on the
+ truth value of \var{v}.
+ \versionadded{2.3}
+ \end{cfuncdesc}
+
\subsection{Long Integer Objects \label{longObjects}}
More information about the Python-checkins
mailing list