On 2019-10-16 21:48, Steven D'Aprano wrote:
On Wed, Oct 16, 2019 at 05:27:31PM -0000, Steve Jorgensen wrote:
I feel like this proposal is not quite right, but maybe the idea will provoke some thoughts about something similar that -would- be right.
The idea first came to me upon realizing that since `namedtuple` classes have no special base class beyond `tuple`, there should be some way of identifying them as being primarily structural, even though they are instances of `tuple` which, in other cases, usually means something that is primarily sequential.
I don't think that "structural" is the word you are looking for. Lists and tuples and sets are all structural. That's why they're called "data structures".
Perhaps "collection of named fields"? Sorry, I can't think of a shorter name.
[snip] In Pascal it would be called a "record".