[Python-Dev] Re: adding a bytes sequence type to Python (original) (raw)
Roman Suzi rnd at onego.ru
Tue Aug 17 19:43: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 ]
On Tue, 17 Aug 2004, M.-A. Lemburg wrote:
Michael Hudson wrote:
Anthony Baxter <anthony at interlink.com.au> writes:
A big +1 for a bytes() type, though. I'm not sure on the details, but it'd be nice if it was possible to pass a bytes() object to, for instance, write() directly.
If bytes() doesn't implement the read buffer interface, someone somewhere is going to need shooting :-) Is there any reason you cannot use buffer() ?!
Is it mutable? My guess: no:
d = u'123124' ddd[0] '1' ddd[1] '\x00' ddd[1] = '1' Traceback (most recent call last): File "", line 1, in ? TypeError: buffer is read-only
It already implements all the necessary things and has been available for many years.
It was in the shadows because we had byte-strings.
Sincerely yours, Roman Suzi
rnd at onego.ru == My AI powered by GNU/Linux RedHat 7.3
- 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 ]