[Python-checkins] python/dist/src/Doc/api concrete.tex,1.19,1.20

montanaro@users.sourceforge.net montanaro@users.sourceforge.net
Sun, 02 Feb 2003 21:13:26 -0800


Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1:/tmp/cvs-serv32146

Modified Files:
	concrete.tex 
Log Message:
* Add description of PyInt_FromString.
* Correct description of PyFloat_FromString.  While ignored, the pend
  argument still has to be given.
* Typo in PyLong_FromString.


Index: concrete.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** concrete.tex	3 Feb 2003 03:56:36 -0000	1.19
--- concrete.tex	3 Feb 2003 05:13:24 -0000	1.20
***************
*** 130,133 ****
--- 130,152 ----
  \end{cfuncdesc}
  
+ \begin{cfuncdesc}{PyObject*}{PyInt_FromString}{char *str, char **pend,
+                                                int base}
+   Return a new \ctype{PyIntObject} or \ctype{PyLongObject} based on the
+   string value in \var{str}, which is interpreted according to the radix in
+   \var{base}.  If \var{pend} is non-\NULL, \code{*\var{pend}} will point to
+   the first character in \var{str} which follows the representation of the
+   number.  If \var{base} is \code{0}, the radix will be determined based on
+   the leading characters of \var{str}: if \var{str} starts with \code{'0x'}
+   or \code{'0X'}, radix 16 will be used; if \var{str} starts with
+   \code{'0'}, radix 8 will be used; otherwise radix 10 will be used.  If
+   \var{base} is not \code{0}, it must be between \code{2} and \code{36},
+   inclusive.  Leading spaces are ignored.  If there are no digits,
+   \exception{ValueError} will be raised.  If the string represents a number
+   too large to be contained within the machine's \ctype{long int} type and
+   overflow warnings are being suppressed, a \ctype{PyLongObject} will be
+   returned.  If overflow warnings are not being suppressed, \NULL{} will be
+   returned in this case.
+ \end{cfuncdesc}
+ 
  \begin{cfuncdesc}{PyObject*}{PyInt_FromLong}{long ival}
    Creates a new integer object with a value of \var{ival}.
***************
*** 215,219 ****
    point to the first character in \var{str} which follows the
    representation of the number.  If \var{base} is \code{0}, the radix
!   will be determined base on the leading characters of \var{str}: if
    \var{str} starts with \code{'0x'} or \code{'0X'}, radix 16 will be
    used; if \var{str} starts with \code{'0'}, radix 8 will be used;
--- 234,238 ----
    point to the first character in \var{str} which follows the
    representation of the number.  If \var{base} is \code{0}, the radix
!   will be determined based on the leading characters of \var{str}: if
    \var{str} starts with \code{'0x'} or \code{'0X'}, radix 16 will be
    used; if \var{str} starts with \code{'0'}, radix 8 will be used;
***************
*** 318,324 ****
  \end{cfuncdesc}
  
! \begin{cfuncdesc}{PyObject*}{PyFloat_FromString}{PyObject *str}
    Creates a \ctype{PyFloatObject} object based on the string value in
!   \var{str}, or \NULL{} on failure.
  \end{cfuncdesc}
  
--- 337,344 ----
  \end{cfuncdesc}
  
! \begin{cfuncdesc}{PyObject*}{PyFloat_FromString}{PyObject *str, char **pend}
    Creates a \ctype{PyFloatObject} object based on the string value in
!   \var{str}, or \NULL{} on failure.  The \var{pend} argument is ignored.  It
!   remains only for backward compatibility.
  \end{cfuncdesc}