mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
[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:
parent
4a7faac557
commit
df399a35d5
1 changed files with 3 additions and 4 deletions
|
@ -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 "+"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue