[Python-Dev] Re: adding a bytes sequence type to Python
Bill Janssen
janssen at parc.com
Tue Aug 17 21:09:22 CEST 2004
> Does b"foo" really make much of a difference?
Yes. My guess is that if you leave it out, you'll see
var = u"foo".encode("ASCII")
all over the place (assuming that encode() will produce a bytes type).
Wouldn't b"foo" be more readable all around?
> Is it so hard to have to write bytes([0x66, 0x6f, 0x6f]) instead of
> b"\x66\x6f\x6f"?
No, that's true. But if you have a bytes literal syntax, might as
well allow \x in it.
Bill
More information about the Python-Dev
mailing list