[Python-Dev] Codecs and StreamCodecs
Fred L. Drake, Jr.
fdrake@acm.org
Tue, 16 Nov 1999 12:25:02 -0500 (EST)
Guido van Rossum writes:
> Also, I don't want to ignore the alternative interface that was
> suggested by /F. It uses feed() similar to htmllib c.s. This has
> some advantages (although we might want to define some compatibility
> so it can also feed directly into a file).
I think one or the other can be used, and then a wrapper that
converts to the other interface. Perhaps the encoders should provide
feed(), and a file-like wrapper can convert write() to feed(). It
could also be done the other way; I'm not sure if it matters which is
"normal." (Or perhaps feed() was badly named and should be write()?
The general intent was a little different, I think, but an output file
is very much a stream consumer.)
-Fred
--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives