diff options
author | Raymond Hettinger <python@rcn.com> | 2016-09-03 08:55:11 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-09-03 08:55:11 (GMT) |
commit | f0f1c239e4addd15180d605306a969a627cb19d5 (patch) | |
tree | b9d88594efebecef059d38320110c1942839be58 /Python | |
parent | 22c108f0194e1e75e359b9861af28c33fe55a795 (diff) | |
download | cpython-f0f1c239e4addd15180d605306a969a627cb19d5.zip cpython-f0f1c239e4addd15180d605306a969a627cb19d5.tar.gz cpython-f0f1c239e4addd15180d605306a969a627cb19d5.tar.bz2 |
Issue 27936: Fix inconsistent round() behavior between float and int
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 9e35eb2..9f5db2a 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2039,7 +2039,7 @@ builtin_round(PyObject *self, PyObject *args, PyObject *kwds) return NULL; } - if (ndigits == NULL) + if (ndigits == NULL || ndigits == Py_None) result = PyObject_CallFunctionObjArgs(round, NULL); else result = PyObject_CallFunctionObjArgs(round, ndigits, NULL); |