Mark Dickinson added the comment:

> 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

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27936>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to