<div dir="ltr"><div><div><div>Just FYI, typing.NamedTuple is there for almost a year and already supports default values, methods, docstrings etc.<br></div>Also there is ongoing work towards dataclasses PEP, see <a href="https://github.com/ericvsmith/dataclasses">https://github.com/ericvsmith/dataclasses</a><br><br></div>So that would keep namedtuple API as it is, and focus only on performance improvements.<br><br>--<br></div>Ivan<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 July 2017 at 02:01, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Guido has decreed that namedtuple shall be reimplemented with speed in mind.<br>
<br>
I haven't timed it (I'm hoping somebody will volunteer to be the bench mark guru), I'll offer my NamedTuple implementation from my aenum [1] library.  It uses the same metaclass techniques as Enum, and offers doc string and default value support in the class-based form.<br>
<br>
--<br>
~Ethan~<br>
<br>
<br>
[1] <a href="https://pypi.python.org/pypi/aenum/1.4.5" rel="noreferrer" target="_blank">https://pypi.python.org/pypi/a<wbr>enum/1.4.5</a><br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofco<wbr>nduct/</a><br>
</blockquote></div><br></div>