[issue27936] Inconsistent round behavior between float and int

Jonatan Skogsfors report at bugs.python.org
Fri Sep 2 02:52:55 EDT 2016


New submission from Jonatan Skogsfors:

Theo error handling for round is different for float and int. 

Python 3.5.1 (default, Apr 18 2016, 11:46:32) 
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> round(1.0, None)
1
>>> round(1, None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object cannot be interpreted as an integer

----------
messages: 274205
nosy: Jonatan Skogsfors
priority: normal
severity: normal
status: open
title: Inconsistent round behavior between float and int
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27936>
_______________________________________


More information about the Python-bugs-list mailing list