Is anyone happy with csv module?

Cliff Wells cliff at develix.com
Tue Dec 11 21:27:55 EST 2007


On Wed, 2007-12-12 at 09:50 +1100, Ben Finney wrote:
> "massimo s." <devicerandom at gmail.com> writes:

> > Yes, but it's natural for a spreadsheet-like thing to have organized
> > columns of data, often.
> 
> Perhaps, but that's not relevant. CSV is a serialisation format for
> tabular data, and is only "a spreadsheet-like thing" in its heritage.
> The CSV data stream is not "spreadsheet-like" at all.

To add some weight to this point, if CSV *weren't* considered a
serialization format (or protocol) this module most likely would have
never been accepted into the standard library in the first place.  There
was some debate when the PEP was submitted over whether CSV was to be
considered a file format (like an .XLS file) or a serialization protocol
(like XML or HTTP).
Fortunately the latter was agreed up and so the module was deemed
appropriate for inclusion in the standard libraries.

Whether or not anyone agrees with this point of view is now mostly
irrelevant, since *by definition* the Python csv module intends to
implement a protocol.  Other implementations remain free to vary in
their definition of CSV.

Regards,
Cliff




More information about the Python-list mailing list