From f9fece08f1d29a0d997088de57fca5291949a866 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sat, 19 Jun 2021 15:32:24 +0100 Subject: [PATCH] bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (cherry picked from commit 291848195f85e23c01adb76d5a0ff9c6eb7f2614) Co-authored-by: Mark Dickinson --- Doc/c-api/object.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 42e3340acb79a0..70cff69dc16c14 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -311,12 +311,12 @@ Object Protocol returned. This is the equivalent to the Python expression ``len(o)``. -.. c:function:: Py_ssize_t PyObject_LengthHint(PyObject *o, Py_ssize_t default) +.. c:function:: Py_ssize_t PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) Return an estimated length for the object *o*. First try to return its actual length, then an estimate using :meth:`~object.__length_hint__`, and finally return the default value. On error return ``-1``. This is the - equivalent to the Python expression ``operator.length_hint(o, default)``. + equivalent to the Python expression ``operator.length_hint(o, defaultvalue)``. .. versionadded:: 3.4