This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rrenaud
Recipients barry, jdwhitley, rhettinger, rrenaud, skip.montanaro
Date 2009-02-26.22:18:39
SpamBayes Score 6.35628e-07
Marked as misclassified No
Message-id <>
I want to make sure I understand.  Am I correct in believing that Skip
thinks writing headers should be optional, while Jervis believes we
should leave the burden to the NamedTupleWriter client?  

I agree that we should not unconditionally write headers, but I think
that we should write headers by default, much like we read them by default.

I believe the implicit header writing is very elegant, and the only
reason that the DictWriter object doesn't write headers is the impedance
mismatch between dicts and CSV.  namedtuples has the field order
information, the impedance mismatch is gone, we should no longer be
hindered.  Implicitly reading but not explicitly writing headers just
seems wrong.

It also seems wrong to require the construction of "header" namedtuple
objects.  It's much less natural than dicts holding identity mappings.

>>> Point._make(Point._fields)
Point(x='x', y='y')

To me, that just looks weird and non-obvious to me.  That Point instance
doesn't really fit in my mind as something that should be a Point.
Date User Action Args
2009-02-26 22:18:43rrenaudsetrecipients: + rrenaud, skip.montanaro, barry, rhettinger, jdwhitley
2009-02-26 22:18:43rrenaudsetmessageid: <>
2009-02-26 22:18:40rrenaudlinkissue1818 messages
2009-02-26 22:18:39rrenaudcreate