[triangle-zpug] Undocumented new feature in Python 2.4

Chris Calloway cbc at unc.edu
Wed Aug 24 00:18:28 CEST 2005

I found a new feature not listed in the "What's New in Python 2.4" 
document that bit me in the rear, so I thought I'd share it with you.

The csv module (PEP305) has a class called DictReader. It takes a CSV 
file and a list of field names and maps them into a dictionary with the 
field names as keys. If the field names parameter is omitted, then the 
field names are read from the first line of the CSV file.

Python 2.3 does not allow the omission of the field names parameter. 
This is important if you are dorking around with ImportMembers.py in 
CMFMember. :)


Chris Calloway
office: 17-6 Venable Hall   phone: (919) 962-4323
mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599

More information about the triangle-zpug mailing list