https://github.com/python/cpython/commit/dab9fb3dc2d0a1ccdf4a1a342310af00b6935758 commit: dab9fb3dc2d0a1ccdf4a1a342310af00b6935758 branch: main author: Petr Viktorin <[email protected]> committer: hugovk <[email protected]> date: 2025-12-16T13:38:11+02:00 summary:
Clarify that PyStructSequence is different from collections.namedtuple (#142626) files: M Doc/c-api/tuple.rst diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst index d0add48d7e8457..3e3752696c46d8 100644 --- a/Doc/c-api/tuple.rst +++ b/Doc/c-api/tuple.rst @@ -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. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
