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.

Title: csv.DictWriter -- inconsistent doc & code
Type: Stage:
Components: Extension Modules Versions: Python 2.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: skip.montanaro Nosy List: frougon, nnorwitz, skip.montanaro
Priority: high Keywords:

Created on 2003-08-30 17:39 by frougon, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Messages (4)
msg18015 - (view) Author: Florent Rougon (frougon) Date: 2003-08-30 17:39
csv.DictWriter has similar problems as csv.DictReader
as described in bug #792558.

The signature of csv.DictWriter.__init__ is:

    def __init__(self, f, fieldnames, restval="",
                 dialect="excel", *args):

but the docs says:

class DictWriter(csvfile, fieldnames[, restval=""[,
extrasaction='raise'[, dialect='excel'[, fmtparam]]]])


1. f != csvfile
2. The constructor does not accept **arguments, which
is a problem to pass along the (one or several)
fmtparam mentioned in the doc.
msg18016 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-08-30 20:51
Logged In: YES 

Andrew are you the right person to look at this and 797853?
msg18017 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2003-09-02 14:49
Logged In: YES 

I'm probably the right person for the DictWriter class.  I've been
off the net or basically swamped much of the time lately what
with the stupid virus crap and a house move.  I'll try to get to
it this week sometime.

msg18018 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2003-09-15 18:49
Logged In: YES 

My apologies.  I actually fixed this in CVS last week but
forgot to close the bug report.
Date User Action Args
2022-04-10 16:10:54adminsetgithub: 39150
2003-08-30 17:39:55frougoncreate