Skip to content

Conversation

@encukou
Copy link
Member

@encukou encukou commented Dec 12, 2025

PyStructSequence is a general “named tuple” per the glossary term; it's not like collections.namedtuple.

This came up an a discussion here: #142608 (comment)


📚 Documentation preview 📚: https://cpython-previews--142626.org.readthedocs.build/

Comment on lines +151 to +154
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better, but maybe we can be less vague here and describe difference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants