From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 11 Mar 2026 13:31:51 +0000 (+0100) Subject: [3.13] gh-99875: Document rounding mode for old-style formatting (GH-126382) (#145812) X-Git-Tag: v3.13.13~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17a9c2691ef259ea12a1f3c5c0d1c97f815dc349;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-99875: Document rounding mode for old-style formatting (GH-126382) (#145812) gh-99875: Document rounding mode for old-style formatting (GH-126382) (cherry picked from commit ce1abaf9b83f8535749c6d3d0a0fabf15d87079f) Co-authored-by: Sergey B Kirpichev --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 305b9db47bda..81a6a7511abe 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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)