[Python-Dev] Re: adding a bytes sequence type to Python
"Martin v. Löwis"
martin at v.loewis.de
Tue Aug 17 22:07:46 CEST 2004
Bill Janssen wrote:
> 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).
If you also had
var = bytes(u"foo")
then I guess people would prefer that. People who want to save typing
can do
b = bytes
and, given that the u prefix will be redundant, write
var = b("foo")
Regards,
Martin
More information about the Python-Dev
mailing list