Nick Coghlan <[EMAIL PROTECTED]> added the comment: Like Raymond, I have issues with the idea of implicitly reading the headers in __init__, but would be fine with the idea of a separate method in 2.7/3.1.
As far as working around the absence of such a method goes, I personally use itertools.chain if I happen to need the headers before I start iterating: r = csv.DictReader(open('test.csv')) first = next(r) # Do something with r.fieldnames for row in chain(first, r): # Do something with each row ---------- nosy: +ncoghlan _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3436> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com