Fix outdated note about 'int' rounding or truncating (#102736)

This commit is contained in:
Mark Dickinson 2023-03-16 20:34:42 +00:00 committed by GitHub
parent 6372e290c0
commit 405739f916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

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