[Python-checkins] [3.11] Fix outdated note about 'int' rounding or truncating (GH-102736) (#102766)

mdickinson webhook-mailer at python.org
Thu Mar 16 16:43:02 EDT 2023


https://github.com/python/cpython/commit/df399a35d5ef4647ed29ba40ecb4cb609116683d
commit: df399a35d5ef4647ed29ba40ecb4cb609116683d
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: mdickinson <dickinsm at gmail.com>
date: 2023-03-16T20:42:54Z
summary:

[3.11] Fix outdated note about 'int' rounding or truncating (GH-102736) (#102766)

Fix outdated note about 'int' rounding or truncating (GH-102736)
(cherry picked from commit 405739f9166592104a5b0b945de92e28415ae972)

Co-authored-by: Mark Dickinson <dickinsm at gmail.com>

files:
M Doc/library/stdtypes.rst

diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 1fb3931902e4..e7d43b2809ac 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -335,11 +335,10 @@ Notes:
       single: ceil() (in module math)
       single: trunc() (in module math)
       pair: numeric; conversions
-      pair: C; language
 
-   Conversion from floating point to integer may round or truncate
-   as in C; see functions :func:`math.floor` and :func:`math.ceil` for
-   well-defined conversions.
+   Conversion from :class:`float` to :class:`int` truncates, discarding the
+   fractional part. See functions :func:`math.floor` and :func:`math.ceil` for
+   alternative conversions.
 
 (4)
    float also accepts the strings "nan" and "inf" with an optional prefix "+"



More information about the Python-checkins mailing list