[Python-Dev] Re: adding a bytes sequence type to Python

M.-A. Lemburg mal at egenix.com
Wed Aug 18 19:55:52 CEST 2004


Martin v. Löwis wrote:
> M.-A. Lemburg wrote:
> 
>> Wouldn't it be possible to extend the existing buffer type
>> to meet those standards ?
> 
> Yes; you then need to change all codecs to return buffers
> from .encode.

I'm still not convinced that we can simply drop the existing
immutable 8-bit string type and replace it with a mutable
bytes or buffer type, e.g. would buffer.lower() work on the
buffer itself or return a lowered copy ?

However, if that's where Python will be heading, then you're
right (for most of the codecs: some might want to return
Unicode objects, e.g. unicode-escape).

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Aug 18 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-Dev mailing list