[Python-3000] PEP 3138- String representation in Python 3000

Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 16 01:36:42 CEST 2008


Nick Coghlan wrote:
> What this approach allows you to do is have 
> generic 'transformation' layers in your IO stack, so you can just build 
> up your IO stack as something like:
> 
> XMLParserIO('myschema')
> BufferedTextIO('utf-8')
> BytesTransform('gzip')
> RawSocketIO

There's nothing wrong with that, but what it doesn't
answer is why it's not sufficient just to do things
like

from gzip import gzip_codec
stream2 = BytesTransform(gzip_codec, stream1)

i.e. why there has to be a special kind of namespace
for codecs.

-- 
Greg


More information about the Python-3000 mailing list