mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
gh-100488: Add is_integer method to fractions.Fraction (#100489)
This commit is contained in:
parent
71159a8e07
commit
e83f88a455
4 changed files with 24 additions and 0 deletions
|
|
@ -117,6 +117,12 @@ another rational number, or from a string.
|
|||
|
||||
.. versionadded:: 3.8
|
||||
|
||||
.. method:: is_integer()
|
||||
|
||||
Return ``True`` if the Fraction is an integer.
|
||||
|
||||
.. versionadded:: 3.12
|
||||
|
||||
.. classmethod:: from_float(flt)
|
||||
|
||||
Alternative constructor which only accepts instances of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue