gh-100488: Add is_integer method to fractions.Fraction (#100489)

This commit is contained in:
Shantanu 2023-01-01 02:44:48 -06:00 committed by GitHub
parent 71159a8e07
commit e83f88a455
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 0 deletions

View file

@ -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