Skip to content

Commit 19738a7

Browse files
committed
+1 (to cover bool, for instance)
1 parent 771db87 commit 19738a7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Doc/library/stdtypes.rst

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

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

605-
Given an int ``x``, return the tuple ``(x, 1)``.
605+
Given an integer ``x``, return the tuple ``(int(x), 1)``.
606606

607607
.. versionadded:: 3.8
608608

Objects/clinic/longobject.c.h

Lines changed: 2 additions & 2 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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6020,7 +6020,7 @@ int_bit_count_impl(PyObject *self)
60206020
/*[clinic input]
60216021
int.as_integer_ratio
60226022
6023-
Given an int x, return the tuple (x, 1).
6023+
Given an integer x, return the tuple (int(x), 1).
60246024
60256025
>>> (10).as_integer_ratio()
60266026
(10, 1)
@@ -6032,7 +6032,7 @@ Given an int x, return the tuple (x, 1).
60326032

60336033
static PyObject *
60346034
int_as_integer_ratio_impl(PyObject *self)
6035-
/*[clinic end generated code: output=e60803ae1cc8621a input=773adde26ef0a5c3]*/
6035+
/*[clinic end generated code: output=e60803ae1cc8621a input=61de2d707e10af00]*/
60366036
{
60376037
PyObject *ratio_tuple;
60386038
PyObject *numerator = long_long(self);

0 commit comments

Comments
 (0)