-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
bpo-33073: Adding as_integer_ratio to ints. #8750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ff0790e
d1daadc
3b89b6f
48c7dd0
4ca566a
2336cb4
673a0ca
5102589
a935a7b
3cd076c
028417a
2028d97
89a0d9d
148225c
ac0f11f
cb9c978
d311b83
d3ef843
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -541,9 +541,10 @@ class`. In addition, it provides a few more methods: | |
|
|
||
| .. method:: int.as_integer_ratio() | ||
|
|
||
| Return a pair of integers whose ratio is exactly equal to the original integer | ||
| and with a positive denominator. The integer ratio of integers (whole numbers) | ||
| is always the integer as the numerator and 1 as the denominator. | ||
| Return a pair of integers whose ratio is exactly equal to the original | ||
| integer and with a positive denominator. The integer ratio of integers | ||
| (whole numbers) is always the integer as the numerator and 1 as the | ||
| denominator. | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A |
||
| .. versionadded:: 3.8 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,6 +94,10 @@ Other Language Changes | |
| * Added support of ``\N{name}`` escapes in :mod:`regular expressions <re>`. | ||
| (Contributed by Jonathan Eunice and Serhiy Storchaka in :issue:`30688`.) | ||
|
|
||
| * The ``int`` type now has a new ``as_integer_ratio`` method compatible | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add links: :class:`int`
:meth:`~int.as_integer_ratio`
:meth:`float.as_integer_ratio` |
||
| with the existing ``float.as_integer_ratio`` method. | ||
| (Contributed by Lisa Roach in :issue:`33073`.) | ||
|
|
||
|
|
||
| New Modules | ||
| =========== | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``1``