Skip to content

Commit fb7be90

Browse files
committed
Improve docstring of Fraction.as_integer_ratio(), following python/cpython#101843
1 parent 6b3749a commit fb7be90

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/quicktions.pyx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,9 @@ cdef class Fraction:
514514
return self._denominator == 1
515515

516516
def as_integer_ratio(self):
517-
"""Return the integer ratio as a tuple.
517+
"""Return a pair of integers, whose ratio is equal to the original Fraction.
518518
519-
Return a tuple of two integers, whose ratio is equal to the
520-
Fraction and with a positive denominator.
519+
The ratio is in lowest terms and has a positive denominator.
521520
"""
522521
return (self._numerator, self._denominator)
523522

0 commit comments

Comments
 (0)