[Python-Dev] Re: adding a bytes sequence type to Python (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Tue Aug 17 22:07:46 CEST 2004
- Previous message: [Python-Dev] Re: adding a bytes sequence type to Python
- Next message: [Python-Dev] Re: adding a bytes sequence type to Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Re: adding a bytes sequence type to Python
- Next message: [Python-Dev] Re: adding a bytes sequence type to Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]