[Python-Dev] Decoding incomplete unicode

"Martin v. Löwis" martin at v.loewis.de
Thu Aug 26 23:00:44 CEST 2004


M.-A. Lemburg wrote:
> Uhm, I wasn't talking about the builtin codecs only (of course,
> we can change those to our liking). I'm after a generic
> interface for stateful codecs.

But we already have that! The StreamReader/StreamWriter interface
is perfectly suited for stateful codecs, and we have been supporting
it for several years now. The only problem is that a few builtin
codecs failed to implement that correctly, and Walter's patch fixes
that bug. There is no API change necessary whatsoever.

> True, but the codec writer should be in control of the
> state object, its format and what the user can or cannot
> change.

And indeed, with the current API, he is.

Regards,
Martin


More information about the Python-Dev mailing list