csv-0.3 released

Chris Barker chrishbarker at home.net
Mon Jun 18 18:58:24 EDT 2001


Skip Montanaro wrote:
>     Chris> This appears to mean that the CSV parser is slower that
>     Chris> string.split, and as far as I can tell, does pretty much the same
>     Chris> thing. What am I missing?
> 
> CSV files can be syntactically more complex than simply inserting commas
> between fields.  For example, if a field contains a comma, it must be
> quoted:
> 
>     1,2,3,"I think, therefore I am",5,6

Ahh, I figured I was missing something! As it happens, I've been
intending to write something similar...I was going to call it
quoted_split, or something like that. IMHO, Python should have something
like this in it's native string methods, it is a pretty common thing to
need, and there it would be pretty slow in native Python.

Dave, I suggest you put a more complicated example on your web site, so
that people (lke me) will have a better idea what a valuable thing you
are offering!

-Chris


-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list