[Csv] Status

Andrew McNamara andrewm at object-craft.com.au
Thu Jan 30 04:51:41 CET 2003


>Not really.  In my mind, if I try to write
>
>    [5.0, "marty", "golden slippers", None]
>
>then I have a bug somewhere.  I *don't* want None silently converted to ''.

I think you might be right.

[invalid combinations of options]
>I can live with that.  I would propose then that escape_char default to
>something reasonable, not None.

That's a little hairy, because the resulting file can't be parsed
correctly by Excel. But it should be safe if the escape_char is only
emitted if quote is set to none.

>If I cave on this, they you have to cave on None. ;-)

*-)

[binary file mode, StringIO has no mode attribute]
>Correct.  That occurred to me as well.  Do we just punt if hasattr(file,
>obj, "mode") returns False?

Yes (or just catch the AttributeError and ignore it).

>"Handle Unicode" probably doesn't mean messing with encoding/decoding
>issues though.  Let the user deal with them.

But the C code will care if it's passed a unicode string (which, I
understand, are not 8 bits per character - typically 16 bits). And the
escape_char, etc, will be 16 bits. I understand that some of the other C
modules are compiled twice and #define tricks are used to produce two
versions that perform optimally on their respective string type.

>Now to see about Mailman 2.1...

Did you try my suggestion? I have a vague memory of there being an
earlier version of Mailman that forgot to create that file.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
_______________________________________________
Csv mailing list
Csv at mail.mojam.com
http://manatee.mojam.com/mailman/listinfo/csv



More information about the Csv mailing list