Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-03-01 Thread M.-A. Lemburg
Walter Dörwald wrote: > M.-A. Lemburg wrote: >> Walter Dörwald wrote: >>> Hye-Shik Chang wrote: >>> On 2/19/06, Walter Dörwald <[EMAIL PROTECTED]> wrote: > M.-A. Lemburg wrote: >> Walter Dörwald wrote: >>> Anyway, I've started implementing a patch that just adds >>> codecs.Stat

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-03-01 Thread Walter Dörwald
Anthony Baxter wrote: > On Thursday 02 March 2006 01:48, Walter Dörwald wrote: >> Any progress on this? I'd really like to get this into 2.5 and the >> feature freeze is approaching fast! > > Remember, the feature freeze is as of beta1. Hopefully the major new > features are all going to be in be

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-03-01 Thread Anthony Baxter
On Thursday 02 March 2006 01:48, Walter Dörwald wrote: > Any progress on this? I'd really like to get this into 2.5 and the > feature freeze is approaching fast! Remember, the feature freeze is as of beta1. Hopefully the major new features are all going to be in before alpha1, but they can contin

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-03-01 Thread Walter Dörwald
M.-A. Lemburg wrote: > Walter Dörwald wrote: >> Hye-Shik Chang wrote: >> >>> On 2/19/06, Walter Dörwald <[EMAIL PROTECTED]> wrote: M.-A. Lemburg wrote: > Walter Dörwald wrote: >> Anyway, I've started implementing a patch that just adds >> codecs.StatefulEncoder/codecs.StatefulDecod

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-21 Thread M.-A. Lemburg
Walter Dörwald wrote: > Hye-Shik Chang wrote: > >> On 2/19/06, Walter Dörwald <[EMAIL PROTECTED]> wrote: >>> M.-A. Lemburg wrote: Walter Dörwald wrote: > Anyway, I've started implementing a patch that just adds > codecs.StatefulEncoder/codecs.StatefulDecoder. UTF8, UTF8-Sig, > UTF

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-21 Thread Walter Dörwald
Hye-Shik Chang wrote: > On 2/19/06, Walter Dörwald <[EMAIL PROTECTED]> wrote: >> M.-A. Lemburg wrote: >>> Walter Dörwald wrote: Anyway, I've started implementing a patch that just adds codecs.StatefulEncoder/codecs.StatefulDecoder. UTF8, UTF8-Sig, UTF-16, UTF-16-LE and UTF-16-BE ar

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-19 Thread Hye-Shik Chang
On 2/19/06, Walter Dörwald <[EMAIL PROTECTED]> wrote: > M.-A. Lemburg wrote: > > Walter Dörwald wrote: > >> Anyway, I've started implementing a patch that just adds > >> codecs.StatefulEncoder/codecs.StatefulDecoder. UTF8, UTF8-Sig, > >> UTF-16, UTF-16-LE and UTF-16-BE are already working. > > > >

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-18 Thread Walter Dörwald
M.-A. Lemburg wrote: > Walter Dörwald wrote: >> M.-A. Lemburg wrote: >>> Walter Dörwald wrote: [...] > Perhaps we should also deprecate codecs.lookup() in Py 2.5 ?! +1, but I'd like to have a replacement for this, i.e. a function that returns all info the registry has about an e

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-18 Thread M.-A. Lemburg
Walter Dörwald wrote: > M.-A. Lemburg wrote: >> Walter Dörwald wrote: >> I'd suggest we keep codecs.lookup() the way it is and >> instead add new functions to the codecs module, e.g. >> codecs.getencoderobject() and codecs.getdecoderobject(). >> >> Changing the codec registratio

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-18 Thread Walter Dörwald
M.-A. Lemburg wrote: > Walter Dörwald wrote: > I'd suggest we keep codecs.lookup() the way it is and > instead add new functions to the codecs module, e.g. > codecs.getencoderobject() and codecs.getdecoderobject(). > > Changing the codec registration is not much of a problem: >>

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-17 Thread M.-A. Lemburg
Walter Dörwald wrote: I'd suggest we keep codecs.lookup() the way it is and instead add new functions to the codecs module, e.g. codecs.getencoderobject() and codecs.getdecoderobject(). Changing the codec registration is not much of a problem: we could simply allow 6-t

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-17 Thread Walter Dörwald
M.-A. Lemburg wrote: > Walter Dörwald wrote: >> M.-A. Lemburg wrote: >>> Walter Dörwald wrote: [...] So maybe codecs.lookup() should return an instance of a subclass of tuple which has the StatefulEncoder/Decoder as attributes. But then codecs.lookup() must be able to hand

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-17 Thread M.-A. Lemburg
Walter Dörwald wrote: > M.-A. Lemburg wrote: >> Walter Dörwald wrote: >>> M.-A. Lemburg wrote: >>> [...] Like I suggested in the patch discussion, such functionality could be factored out of the implementations of StreamReaders/Writers and put into new StatefulEncoder/Decoder cl

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-17 Thread Walter Dörwald
M.-A. Lemburg wrote: > Walter Dörwald wrote: >> M.-A. Lemburg wrote: >> >>> [...] >>> Like I suggested in the patch discussion, such functionality could >>> be factored out of the implementations of StreamReaders/Writers >>> and put into new StatefulEncoder/Decoder classes, the objects of >>> which

Re: [Python-Dev] Stateful codecs [Was: str object going in Py3K]

2006-02-17 Thread M.-A. Lemburg
Walter Dörwald wrote: > M.-A. Lemburg wrote: > >> Walter Dörwald wrote: >>> Guido van Rossum wrote: >>> [...] Years ago I wrote a prototype; checkout sandbox/sio/. >>> However sio.DecodingInputFilter and sio.EncodingOutputFilter don't work >>> for encodings that need state (e.g. when rea