mirror of https://github.com/python/cpython.git
bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (GH-26804)
(cherry picked from commit 291848195f
)
This commit is contained in:
parent
c6cd2ecdb6
commit
139c5778c2
|
@ -311,12 +311,12 @@ Object Protocol
|
||||||
returned. This is the equivalent to the Python expression ``len(o)``.
|
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
|
Return an estimated length for the object *o*. First try to return its
|
||||||
actual length, then an estimate using :meth:`~object.__length_hint__`, and
|
actual length, then an estimate using :meth:`~object.__length_hint__`, and
|
||||||
finally return the default value. On error return ``-1``. This is the
|
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
|
.. versionadded:: 3.4
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue