summaryrefslogtreecommitdiffstats
path: root/Objects/clinic
diff options
context:
space:
mode:
authorKirill Podoprigora <kirill.bast9@mail.ru>2024-06-07 08:03:28 (GMT)
committerGitHub <noreply@github.com>2024-06-07 08:03:28 (GMT)
commit57ad769076201c858a768d81047f6ea44925a33b (patch)
treef6dc9e6cbdd2732be17f6029bc795396d80c809b /Objects/clinic
parentbd826b9c77dbf7c789433cb8061c733c08634c0e (diff)
downloadcpython-57ad769076201c858a768d81047f6ea44925a33b.zip
cpython-57ad769076201c858a768d81047f6ea44925a33b.tar.gz
cpython-57ad769076201c858a768d81047f6ea44925a33b.tar.bz2
gh-120080: Accept ``None`` as a valid argument for direct call of the ``int.__round__`` (#120088)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Objects/clinic')
-rw-r--r--Objects/clinic/longobject.c.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h
index 56bc386..90375b9 100644
--- a/Objects/clinic/longobject.c.h
+++ b/Objects/clinic/longobject.c.h
@@ -116,7 +116,7 @@ exit:
}
PyDoc_STRVAR(int___round____doc__,
-"__round__($self, ndigits=<unrepresentable>, /)\n"
+"__round__($self, ndigits=None, /)\n"
"--\n"
"\n"
"Rounding an Integral returns itself.\n"
@@ -133,7 +133,7 @@ static PyObject *
int___round__(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
- PyObject *o_ndigits = NULL;
+ PyObject *o_ndigits = Py_None;
if (!_PyArg_CheckPositional("__round__", nargs, 0, 1)) {
goto exit;
@@ -476,4 +476,4 @@ int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return int_is_integer_impl(self);
}
-/*[clinic end generated code: output=2ba2d8dcda9b99da input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a53f5ba9a6c16737 input=a9049054013a1b77]*/