Skip to content

Commit dab9fb3

Browse files
authored
Clarify that PyStructSequence is different from collections.namedtuple (#142626)
1 parent ba587ed commit dab9fb3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/c-api/tuple.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,11 @@ Tuple Objects
148148
Struct Sequence Objects
149149
-----------------------
150150
151-
Struct sequence objects are the C equivalent of :func:`~collections.namedtuple`
152-
objects, i.e. a sequence whose items can also be accessed through attributes.
151+
A struct sequence object is a :term:`named tuple`, that is, a sequence
152+
whose items can also be accessed through attributes.
153+
It is similar to :func:`collections.namedtuple`, but provides a slightly
154+
different interface.
155+
153156
To create a struct sequence, you first have to create a specific struct sequence
154157
type.
155158

0 commit comments

Comments
 (0)