On Tue, 15 Mar 2022 at 03:16, wfdc <w...@protonmail.com> wrote: > > Yes, and dataclasses and namedtuples support this concept very nicely. You > > still haven't shown why neither works. > > 1. They're less efficient, as Christopher pointed out long ago. > > 2. They're not sequences, so conceptually the wrong tool for the job. >
A namedtuple IS a sequence. It is a tuple. They are deliberately designed to be drop-in replacements for tuples. 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/OYMJH6445PZ2P4LE5SGLH3QKXV2FHNH5/ Code of Conduct: http://python.org/psf/codeofconduct/