mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
Clarify that PyStructSequence is different from collections.namedtuple (#142626)
This commit is contained in:
parent
ba587ed8f3
commit
dab9fb3dc2
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user