]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarify that PyStructSequence is different from collections.namedtuple (#142626)
authorPetr Viktorin <encukou@gmail.com>
Tue, 16 Dec 2025 11:38:11 +0000 (12:38 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Dec 2025 11:38:11 +0000 (13:38 +0200)
Doc/c-api/tuple.rst

index d0add48d7e8457193a8e8d11c7df584dfb5c7a69..3e3752696c46d899463f249eb9d45afba32d69c4 100644 (file)
@@ -148,8 +148,11 @@ Tuple Objects
 Struct Sequence Objects
 -----------------------
 
-Struct sequence objects are the C equivalent of :func:`~collections.namedtuple`
-objects, i.e. a sequence whose items can also be accessed through attributes.
+A struct sequence object is a :term:`named tuple`, that is, a sequence
+whose items can also be accessed through attributes.
+It is similar to :func:`collections.namedtuple`, but provides a slightly
+different interface.
+
 To create a struct sequence, you first have to create a specific struct sequence
 type.