]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-99875: Document rounding mode for old-style formatting (GH-126382) (#145812)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 11 Mar 2026 13:31:51 +0000 (14:31 +0100)
committerGitHub <noreply@github.com>
Wed, 11 Mar 2026 13:31:51 +0000 (13:31 +0000)
gh-99875: Document rounding mode for old-style formatting (GH-126382)
(cherry picked from commit ce1abaf9b83f8535749c6d3d0a0fabf15d87079f)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Doc/library/stdtypes.rst

index 305b9db47bda34ffefb08fc7c1a242e3c60d0004..81a6a7511abea5d454cca29e6c963d249e79e34d 100644 (file)
@@ -3012,6 +3012,10 @@ The conversion types are:
 |            | character in the result.                            |       |
 +------------+-----------------------------------------------------+-------+
 
+For floating-point formats, the result should be correctly rounded to a given
+precision ``p`` of digits after the decimal point.  The rounding mode matches
+that of the :func:`round` builtin.
+
 Notes:
 
 (1)