[ python-Bugs-792558 ] csv.DictReader parms inconsistent with docs

SourceForge.net noreply at sourceforge.net
Thu Apr 15 23:14:22 EDT 2004


Bugs item #792558, was opened at 2003-08-21 10:22
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=792558&group_id=5470

Category: Python Library
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Peter Otten (potten)
Assigned to: Skip Montanaro (montanaro)
Summary: csv.DictReader parms inconsistent with docs

Initial Comment:
To conform with the documentation, csv.DictReader 
(and possibly DictWriter) should accept keyword 
arguments to specify a dialect on the fly and forward 
them to its reader instance: 
 
class DictReader: 
    def __init__(self, f, fieldnames, restkey=None, 
restval=None, 
                 dialect="excel", *args, **kwd): 
        self.fieldnames = fieldnames    # list of keys for 
the dict 
        self.restkey = restkey          # key to catch long 
rows 
        self.restval = restval          # default value for 
short rows 
        self.reader = reader(f, dialect, *args, **kwd) 
 

----------------------------------------------------------------------

>Comment By: Skip Montanaro (montanaro)
Date: 2004-04-15 22:14

Message:
Logged In: YES 
user_id=44345

looks like this was fixed in csv.py 1.9.  must have forgotten to 
close it.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=792558&group_id=5470



More information about the Python-bugs-list mailing list