]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Fix outdated note about 'int' rounding or truncating (GH-102736) (#102766)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 16 Mar 2023 20:42:54 +0000 (13:42 -0700)
committerGitHub <noreply@github.com>
Thu, 16 Mar 2023 20:42:54 +0000 (20:42 +0000)
Fix outdated note about 'int' rounding or truncating (GH-102736)
(cherry picked from commit 405739f9166592104a5b0b945de92e28415ae972)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Doc/library/stdtypes.rst

index 1fb3931902e49472387df304374f98e8f7b78a32..e7d43b2809ac5a7503dfa8d22829443c0a0abef5 100644 (file)
@@ -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 "+"