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 holdenweb
Recipients holdenweb
Date 2016-08-23.16:42:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471970562.41.0.180278117892.issue27842@psf.upfronthosting.co.za>
In-reply-to
Content
It's sometimes annoying that a csv.DictReader doesn't retain the field ordering given in the first line of the file. Sometimes it matters.

This patch converts the reader so that it returns an OrderedDict rather than a plain dict, thereby retaining the ordering.

All tests still pass (though I haven't yet added a test to verify that the field ordering *is* retained - didn't think it was worth it if the patch won't be added, but will happily add that test otherwise).

I have updated the documentation, but was unable in the time available to find out how to correctly reference the OrderedDict class so that it was correctly hyperlinked.
History
Date User Action Args
2016-08-23 16:42:42holdenwebsetrecipients: + holdenweb
2016-08-23 16:42:42holdenwebsetmessageid: <1471970562.41.0.180278117892.issue27842@psf.upfronthosting.co.za>
2016-08-23 16:42:42holdenweblinkissue27842 messages
2016-08-23 16:42:42holdenwebcreate