[Python-Dev] Re: adding a bytes sequence type to Python (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Wed Aug 18 07:01:50 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 ]
M.-A. Lemburg wrote:
Anyway, this whole discussion about a new bytes type doesn't really solve the problem that the b'...' literal was intended for: that of having a nice way to define (read-only) 8-bit binary string literals.
But why do you need a way to spell 8-bit string literals? You can always do
"string".encode("L1")
If that is too much typing, do
def b(s):return s.encode("L1")
b("string")
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 ]