This commit is contained in:
Raymond Hettinger 2016-09-03 01:55:39 -07:00
commit 3b09cd64e0
4 changed files with 17 additions and 2 deletions

View file

@ -2043,7 +2043,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);