]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-101825: Clarify that as_integer_ratio() output is always normalized (#101843)
authorSergey B Kirpichev <skirpichev@gmail.com>
Mon, 27 Feb 2023 19:11:28 +0000 (22:11 +0300)
committerGitHub <noreply@github.com>
Mon, 27 Feb 2023 19:11:28 +0000 (19:11 +0000)
commit4624987b296108c2dc1e6e3a24e65d2de7afd451
tree0a490563b4c31f14740e72ce6b3ef0c0c1a3e2e8
parent4f3786b7616dd464242b88ad6914053d409fe9d2
gh-101825: Clarify that as_integer_ratio() output is always normalized (#101843)

Make docstrings for `as_integer_ratio` consistent across types, and document that
the returned pair is always normalized (coprime integers, with positive denominator).

---------

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Doc/library/fractions.rst
Doc/library/stdtypes.rst
Lib/fractions.py
Objects/clinic/floatobject.c.h
Objects/clinic/longobject.c.h
Objects/floatobject.c
Objects/longobject.c