[Python-3000] Draft PEP for New IO system
Guido van Rossum
guido at python.org
Tue Feb 27 21:44:25 CET 2007
On 2/27/07, Walter Dörwald <walter at livinglogic.de> wrote:
> Guido van Rossum wrote:
> > The encoding/decoding behavior should be no different from that of the
> > encode() and decode() methods on unicode strings and byte arrays.
> Except that it must work in incremental mode. The new (in 2.5)
> incremental codecs should be usable for that.
Thanks for reminding! Do the incremental codecs have internal state? I
wonder how this interacts with non-blocking reads. (I know
next-to-nothing about incremental codecs beyond that they exist. :-)
> > Certainly no normalization of diacritics will be done; surrogate
> > handling depends on the encoding and whether the unicode string
> > implementation uses 16 or 32 bits per character.
> > I agree that we need to be able to specify the error handling as well.
> Should it be possible to change the error handling during the lifetime
> of a stream? Then this change would have to be passed through to the
> underlying codec.
Not unless you have a really good use case handy...
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000