[Python-checkins] python/dist/src/Doc/api concrete.tex,1.48,1.49

montanaro at users.sourceforge.net montanaro at users.sourceforge.net
Wed Jul 28 16:17:07 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18498

Modified Files:
	concrete.tex 
Log Message:
A little boolean music if you please, maestro... (Not sure I have the 
versionadded{} args quite right).


Index: concrete.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** concrete.tex	23 Jul 2004 14:49:52 -0000	1.48
--- concrete.tex	28 Jul 2004 14:17:04 -0000	1.49
***************
*** 193,196 ****
--- 193,230 ----
  \end{cfuncdesc}
  
+ \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{cfuncdesc}{Py_RETURN_FALSE}
+ Return Py_False from a function, properly incrementing its reference
+ count.
+ \versionadded{2.4}
+ \end{cfuncdesc}
+ 
+ \begin{cfuncdesc}{Py_RETURN_TRUE}
+ Return Py_True from a function, properly incrementing its reference
+ count.
+ \versionadded{2.4}
+ \end{cfuncdesc}
+ 
+ \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