Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstring.tex @ 10229:ce57eb30968a legacy-trunk
Add notes to __builtin__.float() and string.atof() that the NaN and Inf
results are possible but non-portable.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 18 Feb 1999 16:08:36 +0000 |
| parents | b30077c57348 |
| children | e4e800a78d8d |
line wrap: on
line diff
--- a/Doc/lib/libstring.tex Thu Feb 18 16:04:35 1999 +0000 +++ b/Doc/lib/libstring.tex Thu Feb 18 16:08:36 1999 +0000 @@ -59,11 +59,15 @@ \begin{funcdesc}{atof}{s} Convert a string to a floating point number. The string must have the standard syntax for a floating point literal in Python, - optionally preceded by a sign (\samp{+} or \samp{-}), or be - \code{'NaN'} (case insensitive) to indicate the IEEE ``Not a - Number'' value. Note that this behaves identical to the built-in - function \function{float()}\bifuncindex{float} when passed a - string. + optionally preceded by a sign (\samp{+} or \samp{-}). Note that + this behaves identical to the built-in function + \function{float()}\bifuncindex{float} when passed a string. + + \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}{atoi}{s\optional{, base}}
