8000 Fix outdated note about 'int' rounding or truncating (#102736) · Fidget-Spinner/cpython@2c96fc0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c96fc0

Browse files
mdickinsonFidget-Spinner
authored andcommitted
Fix outdated note about 'int' rounding or truncating (python#102736)
1 parent 93e32d6 commit 2c96fc0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/library/stdtypes.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,10 @@ Notes:
335335
single: ceil() (in module math)
336336
single: trunc() (in module math)
337337
pair: numeric; conversions
338-
pair: C; language
339338

340-
Conversion from floating point to integer may round or truncate
341-
as in C; see functions :func:`math.floor` and :func:`math.ceil` for
342-
well-defined conversions.
339+
Conversion from :class:`float` to :class:`int` truncates, discarding the
340+
fractional part. See functions :func:`math.floor` and :func:`math.ceil` for
341+
alternative conversions.
343342

344343
(4)
345344
float also accepts the strings "nan" and "inf" with an optional prefix "+"

0 commit comments

Comments
 (0)
0