[Python-Dev] Codecs and StreamCodecs
Greg Stein
gstein@lyra.org
Wed, 17 Nov 1999 03:34:30 -0800 (PST)
On Wed, 17 Nov 1999, Fredrik Lundh wrote:
> Greg Stein <gstein@lyra.org> wrote:
> > Why a factory? I've got a simple encode() function. I don't need a
> > factory. "flexibility" at the cost of complexity (IMO).
>
> so where do you put the state?
encode() is not supposed to retain state. It is supposed to do a complete
translation. It is not a stream thingy, which may have received partial
characters.
> how do you reset the state between
> strings?
There is none :-)
> how do you handle incremental
> decoding/encoding?
Streams.
-g
--
Greg Stein, http://www.lyra.org/