19.07.17 01:33, Greg Ewing пише:
Jim J. Jewett wrote:
is there any reason not to simply define it as a view on a dict, or at
least as a limited proxy to one?

Some valuable characteristics of namedtuples as they are now:

* Instances are very lightweight
* Access by index is fast
* Can be used as a dict key

* Are tuple subclasses. This is important for compatibility with tuples, because namedtuples usually are used as replacements for tuples.

_______________________________________________
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