Author mark.dickinson
Recipients Jonatan Skogsfors, mark.dickinson, rhettinger
Date 2016-09-02.08:50:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1472806247.48.0.453389442443.issue27936@psf.upfronthosting.co.za>
In-reply-to
Content
> 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
History
Date User Action Args
2016-09-02 08:50:47mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, Jonatan Skogsfors
2016-09-02 08:50:47mark.dickinsonsetmessageid: <1472806247.48.0.453389442443.issue27936@psf.upfronthosting.co.za>
2016-09-02 08:50:47mark.dickinsonlinkissue27936 messages
2016-09-02 08:50:47mark.dickinsoncreate