summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libfuncs.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-02-18 16:08:36 (GMT)
committerFred Drake <fdrake@acm.org>1999-02-18 16:08:36 (GMT)
commit70a66c9d6d3d091758de013a3cb6507ce80ee7de (patch)
treef39492e512d4c2fe0309c713e1e3b2bf44e7ffd1 /Doc/lib/libfuncs.tex
parentd60ec8f11a2679e7c56c01cf15e4fef47bdbfe4e (diff)
downloadcpython-70a66c9d6d3d091758de013a3cb6507ce80ee7de.zip
cpython-70a66c9d6d3d091758de013a3cb6507ce80ee7de.tar.gz
cpython-70a66c9d6d3d091758de013a3cb6507ce80ee7de.tar.bz2
Add notes to __builtin__.float() and string.atof() that the NaN and Inf
results are possible but non-portable.
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r--Doc/lib/libfuncs.tex18
1 files changed, 11 insertions, 7 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex
index 316b294..210fec4 100644
--- a/Doc/lib/libfuncs.tex
+++ b/Doc/lib/libfuncs.tex
@@ -231,13 +231,17 @@ removed.
\begin{funcdesc}{float}{x}
Convert a string or a number to floating point. If the argument is a
string, it must contain a possibly signed decimal or floating point
- number, possibly embedded in whitespace, or be \code{'NaN'} (case
- insensitive); this behaves identical to
- \code{string.atof(\var{x})}. If the string is \code{'NaN'}, the
- IEEE ``Not a Number'' value is returned. Otherwise, the argument
- may be a plain or long integer or a floating point number, and a
- floating point number with the same value (within Python's floating
- point precision) is returned.
+ number, possibly embedded in whitespace; this behaves identical to
+ \code{string.atof(\var{x})}. Otherwise, the argument may be a plain
+ or long integer or a floating point number, and a floating point
+ number with the same value (within Python's floating point
+ precision) is returned.
+
+ \strong{Note:} When passing in a string, values for NaN\index{NaN}
+ and Infinity\index{Infinity} may be returned, depending on the
+ underlying C library. The specific set of strings accepted which
+ cause these values to be returned depends entirely on the C library
+ and is known to vary.
\end{funcdesc}
\begin{funcdesc}{getattr}{object, name}