[Python-checkins] CVS: python/dist/src/Doc/lib libfuncs.tex,1.60,1.61
Fred L. Drake
fdrake@weyr.cnri.reston.va.us
Thu, 17 Feb 2000 12:45:55 -0500 (EST)
Update of /projects/cvsroot/python/dist/src/Doc/lib
In directory weyr:/home/fdrake/projects/python/Doc/lib
Modified Files:
libfuncs.tex
Log Message:
Update the description of int() to include the radix parameter;
omission noted on c.l.py by Aahz Maruch.
Swapped the order of the descriptions of int() and intern() so that
int() comes first (the functions are in alphabetic order).
Index: libfuncs.tex
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -r1.60 -r1.61
*** libfuncs.tex 1999/08/05 13:43:08 1.60
--- libfuncs.tex 2000/02/17 17:45:52 1.61
***************
*** 313,316 ****
--- 313,332 ----
\end{funcdesc}
+ \begin{funcdesc}{int}{x\optional{, radix}}
+ Convert a string or number to a plain integer. If the argument is a
+ string, it must contain a possibly signed decimal number
+ representable as a Python integer, possibly embedded in whitespace;
+ this behaves identical to \code{string.atoi(\var{x}\optional{,
+ \var{radix}})}. The \var{radix} parameter gives the base for the
+ conversion and may be any integer in the range $[2, 36]$. If
+ \var{radix} is specified and \var{x} is not a string,
+ \exception{TypeError} is raised.
+ Otherwise, the argument may be a plain or
+ long integer or a floating point number. Conversion of floating
+ point numbers to integers is defined by the C semantics; normally
+ the conversion truncates towards zero.\footnote{This is ugly --- the
+ language definition should require truncation towards zero.}
+ \end{funcdesc}
+
\begin{funcdesc}{intern}{string}
Enter \var{string} in the table of ``interned'' strings and return
***************
*** 324,339 ****
have interned keys. Interned strings are immortal (i.e. never get
garbage collected).
- \end{funcdesc}
-
- \begin{funcdesc}{int}{x}
- Convert a string or number to a plain integer. If the argument is a
- string, it must contain a possibly signed decimal number
- representable as a Python integer, possibly embedded in whitespace;
- this behaves identical to \code{string.atoi(\var{x})}.
- Otherwise, the argument may be a plain or
- long integer or a floating point number. Conversion of floating
- point numbers to integers is defined by the C semantics; normally
- the conversion truncates towards zero.\footnote{This is ugly --- the
- language definition should require truncation towards zero.}
\end{funcdesc}
--- 340,343 ----