summaryrefslogtreecommitdiffstats
path: root/Modules/_decimal/docstrings.h
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2015-12-28 22:02:02 (GMT)
committerStefan Krah <skrah@bytereef.org>2015-12-28 22:02:02 (GMT)
commit53f2e0ad45e41c007f714e077ccf11643651ef28 (patch)
treec00ffd5dd955b9685de5c1a12fd014745b22f361 /Modules/_decimal/docstrings.h
parentac1e7f6983ef4f0feef6389d458544bf924f6965 (diff)
downloadcpython-53f2e0ad45e41c007f714e077ccf11643651ef28.zip
cpython-53f2e0ad45e41c007f714e077ccf11643651ef28.tar.gz
cpython-53f2e0ad45e41c007f714e077ccf11643651ef28.tar.bz2
Issue #25928: Add Decimal.as_integer_ratio(). Python parts and docs by
Mark Dickinson.
Diffstat (limited to 'Modules/_decimal/docstrings.h')
-rw-r--r--Modules/_decimal/docstrings.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/_decimal/docstrings.h b/Modules/_decimal/docstrings.h
index 71029a9..f7fd6e7 100644
--- a/Modules/_decimal/docstrings.h
+++ b/Modules/_decimal/docstrings.h
@@ -70,6 +70,15 @@ PyDoc_STRVAR(doc_as_tuple,
Return a tuple representation of the number.\n\
\n");
+PyDoc_STRVAR(doc_as_integer_ratio,
+"as_integer_ratio($self, /)\n--\n\n\
+Decimal.as_integer_ratio() -> (int, int)\n\
+\n\
+Return a pair of integers, whose ratio is exactly equal to the original\n\
+Decimal and with a positive denominator. The ratio is in lowest terms.\n\
+Raise OverflowError on infinities and a ValueError on NaNs.\n\
+\n");
+
PyDoc_STRVAR(doc_canonical,
"canonical($self, /)\n--\n\n\
Return the canonical encoding of the argument. Currently, the encoding\n\