From f0f1c239e4addd15180d605306a969a627cb19d5 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 3 Sep 2016 01:55:11 -0700 Subject: Issue 27936: Fix inconsistent round() behavior between float and int --- Python/bltinmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/bltinmodule.c') diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 9e35eb2a13..9f5db2afe1 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); -- cgit v1.2.1