A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/047952.html below:

[Python-Dev] Re: adding a bytes sequence type to Python

[Python-Dev] Re: adding a bytes sequence type to PythonRoman Suzi rnd at onego.ru
Tue Aug 17 19:43:50 CEST 2004
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 "<stdin>", 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4