[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 405739f916)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-03-16 13:42:54 -07:00 committed by GitHub
parent 4a7faac557
commit df399a35d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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 "+"