Skip to content

Commit 771db87

Browse files
committed
Slightly adjust above suggestion and do same for the docstring
1 parent dc76383 commit 771db87

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

Doc/library/stdtypes.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,7 @@ class`. In addition, it provides a few more methods:
602602

603603
.. method:: int.as_integer_ratio()
604604

605-
Given an integer ``x``, ``x.as_integer_ratio()`` returns the tuple
606-
``(x, 1)``.
605+
Given an int ``x``, return the tuple ``(x, 1)``.
607606

608607
.. versionadded:: 3.8
609608

Objects/clinic/longobject.c.h

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Objects/longobject.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6020,9 +6020,7 @@ int_bit_count_impl(PyObject *self)
60206020
/*[clinic input]
60216021
int.as_integer_ratio
60226022
6023-
Return a pair of integers, whose ratio is equal to the original int.
6024-
6025-
The ratio is in lowest terms and with a positive denominator.
6023+
Given an int x, return the tuple (x, 1).
60266024
60276025
>>> (10).as_integer_ratio()
60286026
(10, 1)
@@ -6034,7 +6032,7 @@ The ratio is in lowest terms and with a positive denominator.
60346032

60356033
static PyObject *
60366034
int_as_integer_ratio_impl(PyObject *self)
6037-
/*[clinic end generated code: output=e60803ae1cc8621a input=c60aa1da86b7a47b]*/
6035+
/*[clinic end generated code: output=e60803ae1cc8621a input=773adde26ef0a5c3]*/
60386036
{
60396037
PyObject *ratio_tuple;
60406038
PyObject *numerator = long_long(self);

0 commit comments

Comments
 (0)