[Python-3000] Immutable bytes type and bsddb or other IO
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Aug 25 03:31:07 CEST 2007
Guido van Rossum wrote:
> there's collusion between the bytes and unicode
> types so that this works:
>
> b = b"abc"
> b[1:2] = "X"
Is this intentional? Doesn't it run counter to the idea
that text and bytes should be clearly separated?
> Unfortunately taking the buffer API away from unicode makes things
> fail early
If the buffer API distinguishes between text and binary
buffers, then the binary streams can just accept binary
buffers only, and unicode can keep its buffer API.
--
Greg
More information about the Python-3000
mailing list