[Python-ideas] Anonymous namedtuples

Joseph Martinot-Lagarde contrebasse at gmail.com
Tue Apr 19 08:49:22 EDT 2016


> This way they could be used in __getitem__ as proposed in PEP 472[0]

One of the link in this PEP is
https://mail.python.org/pipermail/python-ideas/2013-June/021257.html where
the writer raises some concerns about named tuples:

- They pose problems with pickle because namedtuples needs subclasses to
work. In my proposal it shouldn't be a problem anymore since there would be
one class.
- namedtuple() is a factory function requiring a 2-step initialization, a
name, and a subclass. Again it disappears in my proposal.

I'm not sure about the database problem since I don't use them.



More information about the Python-ideas mailing list