mishandling of embedded NULs (was: Re: [Csv] trial zip/tar packages of csv module available)

Skip Montanaro skip at pobox.com
Sat Feb 15 12:07:18 CET 2003


(Last message before leaving for the plane...)

    >> (Should an exception be raised on output as well?)

    John> Yes, but conditionally -- IMHO the caller should be able to
    John> specify (strictwriting=True) that an exception should be raised on
    John> *any* attempt to write data that could not be read back
    John> "sensibly"...

I believe the issue of reading/writing NUL bytes this is just a temporary
limitation of the current implementation.  It will be fixed it in the future
(it has to, because some Unicode encodings will read or write NULs in the
data stream), so we don't need to get very elaborate with our handling of
NULs.  For now, simply raising an exception should suffice.

Skip


More information about the Csv mailing list