Message274212
> I think the round() function should explicitly check for None and replace it with zero
That would be a change in behaviour: `round(x)` is not the same as `round(x, 0)`. For most types, `round(x)` returns an `int`, while `round(x, 0)` returns something of the same type as `x`. Instead, I think we should add the check for `None` to `int`s `__round__` implementation.
>>> round(1.3, 0)
1.0
>>> round(1.3)
1
>>> round(1.3, None)
1 |
|
Date |
User |
Action |
Args |
2016-09-02 08:50:47 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, Jonatan Skogsfors |
2016-09-02 08:50:47 | mark.dickinson | set | messageid: <1472806247.48.0.453389442443.issue27936@psf.upfronthosting.co.za> |
2016-09-02 08:50:47 | mark.dickinson | link | issue27936 messages |
2016-09-02 08:50:47 | mark.dickinson | create | |
|