And, by the way, field names must be valid identifiers. So again, what are the field names supposed to be if the datastructure is being treated as a sequence, of possibly arbitrary length?
------- Original Message ------- On Monday, March 14th, 2022 at 1:07 PM, Chris Angelico <[email protected]> wrote: > On Tue, 15 Mar 2022 at 04:02, wfdc [email protected] wrote: > > > > A namedtuple IS a sequence. It is a tuple. They are deliberately designed > > > to be drop-in replacements for tuples. > > > > I meant that they're not meant to be addressed as sequences. That's the > > whole point of namedtuple: to avoid doing that. > > The whole point is that they are both sequences and structures. > > https://docs.python.org/3/library/collections.html#collections.namedtuple > > ChrisA > > _______________________________________________ > > Python-ideas mailing list -- [email protected] > > To unsubscribe send an email to [email protected] > > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > > Message archived at > https://mail.python.org/archives/list/[email protected]/message/5QBJGA4UB3JJ34IULQSFHTBEZGBEFV7U/ > > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/6V7WSM76RTHKOPHKVNHKROSJ63EKXRW3/ Code of Conduct: http://python.org/psf/codeofconduct/
