Commit 4a3c7c4e authored by Mark Dickinson's avatar Mark Dickinson

Issue #10145: the float.is_integer method was undocumented.

parent 35adf5dc
......@@ -535,6 +535,16 @@ The float type has some additional methods.
:exc:`OverflowError` on infinities and a :exc:`ValueError` on
NaNs.
.. method:: float.is_integer()
Return ``True`` if the float instance is finite with integral
value, and ``False`` otherwise::
>>> (-2.0).is_integer()
True
>>> (3.2).is_integer()
False
Two methods support conversion to
and from hexadecimal strings. Since Python's floats are stored
internally as binary numbers, converting a float to or from a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment