Message413741
The math module documentation says:
Except when explicitly noted otherwise, all return values are floats.
But this code returns an integer:
from math import prod; prod((1,2,3))
Doc should "explicitly note otherwise" here, I imagine. The issue being wanting to know that the result on all-integer input will be an exact (integer) value not a floating value. |
|
Date |
User |
Action |
Args |
2022-02-22 19:04:34 | neilwebber | set | recipients:
+ neilwebber, docs@python |
2022-02-22 19:04:33 | neilwebber | set | messageid: <1645556673.97.0.708040802519.issue46828@roundup.psfhosted.org> |
2022-02-22 19:04:33 | neilwebber | link | issue46828 messages |
2022-02-22 19:04:33 | neilwebber | create | |
|