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 jdwhitley
Recipients barry, jdwhitley, rhettinger, rrenaud, skip.montanaro
Date 2009-02-26.21:02:57
SpamBayes Score 6.83176e-13
Marked as misclassified No
Message-id <>
Skip> Let me be more explicit.  I don't know how it implements it, but I 
Skip> you really need to give the user the option of specifying the 
Skip> names and not reading/writing headers.  It can't be implicit as I
Skip> interpreted Rob's earlier comment:

    rrenaud> NamedTupleReader and NamedTupleWriter should be inverses.
    rrenaud> This means that NamedTupleWriter needs to write headers.

I agree with Skip, we mustn't have a 'wroteheader' flag internal to the 

Currently to write a 'header' row with a csv.writer you could (for 
example) pass a tuple of header names to writerow. NamedTupleWriter
is no different, you would have a namedtuple of header names instead of
a tuple of header names.

I would not like to see another flag added to the initialisation process
to enable the writing of a header row as the 'first' (or any) row 
written to a file.  We could add a function 'writeheader' that would
write the contents of 'fieldnames' as a row, but I don't like the idea.

Date User Action Args
2009-02-26 21:03:00jdwhitleysetrecipients: + jdwhitley, skip.montanaro, barry, rhettinger, rrenaud
2009-02-26 21:03:00jdwhitleysetmessageid: <>
2009-02-26 21:02:58jdwhitleylinkissue1818 messages
2009-02-26 21:02:57jdwhitleycreate