On Thu, May 10, 2012 at 3:34 PM, "Martin v. Löwis" <mar...@v.loewis.de> wrote:
>> We've been over this before: collections.namedtuple *is* the standard
>> library's answer for structured records.
>
>
> And I think it's a really ugly answer, and one that deserves a parallel
> that is not a tuple. If this is contentious, I'll write a PEP.

Yes, please. One of the original arguments that delayed the
introduction of the collections module was the fear that it would lead
to the introduction of tons of subtly different data types, making it
substantially harder to choose the right data type for a given
application. I see this proposal as the realisation of that fear.

Unordered types can be a PITA for testing, for display and for generic
serialisation, so I definitely want to see a PEP before we add a new
one that basically has its sole reason for existence being "you can
iterate over and index the field values in a namedtuple".

Regards,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to