summaryrefslogtreecommitdiffstats
path: root/Doc/library/fractions.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-08-11 21:40:59 (GMT)
committerGitHub <noreply@github.com>2019-08-11 21:40:59 (GMT)
commitf03b4c8a48f62134799d368b78da35301af466a3 (patch)
tree43a5a1282521e4164e63e05674dc7830319700ec /Doc/library/fractions.rst
parent09a1872a8007048dcdf825a476816c5e3498b8f8 (diff)
downloadcpython-f03b4c8a48f62134799d368b78da35301af466a3.zip
cpython-f03b4c8a48f62134799d368b78da35301af466a3.tar.gz
cpython-f03b4c8a48f62134799d368b78da35301af466a3.tar.bz2
bpo-37819: Add Fraction.as_integer_ratio() (GH-15212)
Diffstat (limited to 'Doc/library/fractions.rst')
-rw-r--r--Doc/library/fractions.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/fractions.rst b/Doc/library/fractions.rst
index b5a818e..58e7126 100644
--- a/Doc/library/fractions.rst
+++ b/Doc/library/fractions.rst
@@ -94,6 +94,13 @@ another rational number, or from a string.
Denominator of the Fraction in lowest term.
+ .. method:: as_integer_ratio()
+
+ Return a tuple of two integers, whose ratio is equal
+ to the Fraction and with a positive denominator.
+
+ .. versionadded:: 3.8
+
.. method:: from_float(flt)
This class method constructs a :class:`Fraction` representing the exact