summaryrefslogtreecommitdiff
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 20b7f5120b..8c08866d73 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1042,7 +1042,7 @@ double_round(double x, int ndigits) {
/*[clinic input]
float.__round__
- ndigits as o_ndigits: object = NULL
+ ndigits as o_ndigits: object = None
/
Return the Integral closest to x, rounding half toward even.
@@ -1052,13 +1052,13 @@ When an argument is passed, work like built-in round(x, ndigits).
static PyObject *
float___round___impl(PyObject *self, PyObject *o_ndigits)
-/*[clinic end generated code: output=374c36aaa0f13980 input=1ca2316b510293b8]*/
+/*[clinic end generated code: output=374c36aaa0f13980 input=fc0fe25924fbc9ed]*/
{
double x, rounded;
Py_ssize_t ndigits;
x = PyFloat_AsDouble(self);
- if (o_ndigits == NULL || o_ndigits == Py_None) {
+ if (o_ndigits == Py_None) {
/* single-argument round or with None ndigits:
* round to nearest integer */
rounded = round(x);