File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,12 +231,13 @@ \section{Built-in Functions \label{built-in-funcs}}
231231\begin {funcdesc }{float}{x}
232232 Convert a string or a number to floating point. If the argument is a
233233 string, it must contain a possibly signed decimal or floating point
234- number, possibly embedded in whitespace;
235- this behaves identical to \code {string.atof(\var {x})}.
236- Otherwise, the argument may be a plain or
237- long integer or a floating point number, and a floating point number
238- with the same value (within Python's floating point precision) is
239- returned.
234+ number, possibly embedded in whitespace, or be \code {'NaN'} (case
235+ insensitive); this behaves identical to
236+ \code {string.atof(\var {x})}. If the string is \code {'NaN'}, the
237+ IEEE `` Not a Number'' value is returned. Otherwise, the argument
238+ may be a plain or long integer or a floating point number, and a
239+ floating point number with the same value (within Python's floating
240+ point precision) is returned.
240241\end {funcdesc }
241242
242243\begin {funcdesc }{getattr}{object, name}
Original file line number Diff line number Diff line change @@ -59,9 +59,11 @@ \section{\module{string} ---
5959\begin {funcdesc }{atof}{s}
6060 Convert a string to a floating point number. The string must have
6161 the standard syntax for a floating point literal in Python,
62- optionally preceded by a sign (\samp {+} or \samp {-}). Note that
63- this behaves identical to the built-in function
64- \function {float()}\bifuncindex {float} when passed a string.
62+ optionally preceded by a sign (\samp {+} or \samp {-}), or be
63+ \code {'NaN'} (case insensitive) to indicate the IEEE `` Not a
64+ Number'' value. Note that this behaves identical to the built-in
65+ function \function {float()}\bifuncindex {float} when passed a
66+ string.
6567\end {funcdesc }
6668
6769\begin {funcdesc }{atoi}{s\optional {, base}}
You can’t perform that action at this time.
0 commit comments