[Python-ideas] Adding 'bytes' as alias for 'latin_1' codec.

Raymond Hettinger raymond.hettinger at gmail.com
Mon May 30 06:58:52 CEST 2011


On May 29, 2011, at 9:45 PM, Nick Coghlan wrote:

> On Mon, May 30, 2011 at 12:39 PM, Stephen J. Turnbull
> <stephen at xemacs.org> wrote:
>> (However, there are use
>> cases where it is claimed that 'HELO ' is needed both as str and as
>> bytes.)
> 
> My current opinion is that all of this still needs more
> experimentation outside the core before we start fiddling any further
> with the builtins (we blinked once in the lead-up to 3.0 by allowing
> bytes and bytearray to retain a lot of string methods that assume an
> ASCII compatible encoding, and I now have my doubts about the wisdom
> of even that step). I don't have a good answer on how to deal with the
> real world situations where the *use case* blurs the bytes/text
> distinction (typically by embedding ASCII text inside an otherwise
> binary protocol), and given the potential to backslide into the bad
> old days of 8-bit strings, I'm not prepared to guess, either.

+1


Raymond



More information about the Python-ideas mailing list