Just FYI, typing.NamedTuple is there for almost a year and already supports
default values, methods, docstrings etc.
Also there is ongoing work towards dataclasses PEP, see
https://github.com/ericvsmith/dataclasses

So that would keep namedtuple API as it is, and focus only on performance
improvements.

--
Ivan



On 18 July 2017 at 02:01, Ethan Furman <et...@stoneleaf.us> wrote:

> Guido has decreed that namedtuple shall be reimplemented with speed in
> mind.
>
> 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.
>
> --
> ~Ethan~
>
>
> [1] https://pypi.python.org/pypi/aenum/1.4.5
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to