Skip to content

Commit 99b38be

Browse files
[3.10] Fix outdated note about 'int' rounding or truncating (GH-102736) (#102767)
Fix outdated note about 'int' rounding or truncating (GH-102736) (cherry picked from commit 405739f) Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
1 parent 9781240 commit 99b38be

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/library/stdtypes.rst

+3-4
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)