diff options
| author | shadchin <[email protected]> | 2026-06-24 07:09:14 +0300 |
|---|---|---|
| committer | shadchin <[email protected]> | 2026-06-24 07:31:09 +0300 |
| commit | 280914cd46f4411a2e01150bf9d9c53dff19fa66 (patch) | |
| tree | 841d7b8330cb51e86f2ea6e915e4904563321aca /contrib/tools/python3/Objects/tupleobject.c | |
| parent | 1100ced6faf1d14f48cb041f885882d3b37491a2 (diff) | |
Update Python 3 to 3.13.14
commit_hash:9913a0288f56b5ddd0f99e5b2ff1569d491cbe5d
Diffstat (limited to 'contrib/tools/python3/Objects/tupleobject.c')
| -rw-r--r-- | contrib/tools/python3/Objects/tupleobject.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 */ }; |
