mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
atof() description: Add information about accepting 'NaN' to produce
the NaN value.
This commit is contained in:
parent
594b3d66bd
commit
951eea4733
2 changed files with 12 additions and 9 deletions
|
@ -231,12 +231,13 @@ 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;
|
||||
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.
|
||||
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.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{getattr}{object, name}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue