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 <ros...@gmail.com> wrote:

> On Tue, 15 Mar 2022 at 04:02, wfdc w...@protonmail.com 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 -- python-ideas@python.org
>
> To unsubscribe send an email to python-ideas-le...@python.org
>
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
>
> Message archived at 
> https://mail.python.org/archives/list/python-ideas@python.org/message/5QBJGA4UB3JJ34IULQSFHTBEZGBEFV7U/
>
> Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/6V7WSM76RTHKOPHKVNHKROSJ63EKXRW3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to