From 280914cd46f4411a2e01150bf9d9c53dff19fa66 Mon Sep 17 00:00:00 2001 From: shadchin Date: Wed, 24 Jun 2026 07:09:14 +0300 Subject: Update Python 3 to 3.13.14 commit_hash:9913a0288f56b5ddd0f99e5b2ff1569d491cbe5d --- contrib/tools/python3/Objects/tupleobject.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'contrib/tools/python3/Objects/tupleobject.c') diff --git a/contrib/tools/python3/Objects/tupleobject.c b/contrib/tools/python3/Objects/tupleobject.c index 818814b663d..42c94c8b1e0 100644 --- a/contrib/tools/python3/Objects/tupleobject.c +++ b/contrib/tools/python3/Objects/tupleobject.c @@ -827,11 +827,17 @@ tuple___getnewargs___impl(PyTupleObject *self) return Py_BuildValue("(N)", tupleslice(self, 0, Py_SIZE(self))); } + +PyDoc_STRVAR(tuple_class_getitem_doc, +"Tuples are generic over the types of their contents.\n\n\ +For example, use ``tuple[int, str]`` for a pair whose first element is an int and second element is a string.\n\n\ +Tuples also support the form ``tuple[T, ...]`` to indicate an arbitrary length tuple of elements of type T."); + static PyMethodDef tuple_methods[] = { TUPLE___GETNEWARGS___METHODDEF TUPLE_INDEX_METHODDEF TUPLE_COUNT_METHODDEF - {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, tuple_class_getitem_doc}, {NULL, NULL} /* sentinel */ }; -- cgit v1.3