[I18n-sig] Codecs

M.-A. Lemburg mal@lemburg.com
Mon, 05 Jun 2000 19:40:59 +0200

[codecs.lookup() returning a tuple]
> > * Tuples are much easier to create and query at C level than
> > Python objects having a certain interface.
> I don't see that as very important!

For me it is: I maintain this stuff :-)

Adding full object support would mean that I'd have to
write a new C type which support the object interface -- 
I'm not particularly interested in doing so...

> > encoder = codecs.encoder('utf-8')
> > # dito for .decoder, .streamwriter, .streamreader
> That might be an acceptable compromise on the syntactic issue....but....
> It doesn't seem much more work to just make a version of "lookup" that
> wraps tuples in objects. If we took this half-step then we could decide
> to move to "full objects" in the future and break a lot less code.

I have no problem with a new lookup API which returns
objects, I just wouldn't want to have the codec registry
use these wrapper objects as basis for doing its work.

Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/