[Python-Dev] sys.implementation (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Thu May 10 07:40:02 CEST 2012
- Previous message: [Python-Dev] sys.implementation
- Next message: [Python-Dev] sys.implementation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, May 10, 2012 at 3:34 PM, "Martin v. Löwis" <martin at 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 | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] sys.implementation
- Next message: [Python-Dev] sys.implementation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]