MCPcopy Index your code
hub / github.com/python/cpython / is_integer

Method is_integer

Lib/fractions.py:373–375  ·  view source on GitHub ↗

Return True if the Fraction is an integer.

(self)

Source from the content-addressed store, hash-verified

371 return obj
372
373 def is_integer(self):
374 """Return True if the Fraction is an integer."""
375 return self._denominator == 1
376
377 def as_integer_ratio(self):
378 """Return a pair of integers, whose ratio is equal to the original Fraction.

Callers 3

test_is_integerMethod · 0.80
test_is_integerMethod · 0.80
test_is_integerMethod · 0.80

Calls

no outgoing calls

Tested by 3

test_is_integerMethod · 0.64
test_is_integerMethod · 0.64
test_is_integerMethod · 0.64