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/2007-May/072991.html below:

[Python-Dev] Byte literals (was Re: [Python-checkins] Changing string constants to byte arrays ( r55119

[Python-Dev] Byte literals (was Re: [Python-checkins] Changing string constants to byte arrays ( r55119 - in python/branches/py3k-struni/Lib: codecs.py test/test_codecs.py )) [Python-Dev] Byte literals (was Re: [Python-checkins] Changing string constants to byte arrays ( r55119 - in python/branches/py3k-struni/Lib: codecs.py test/test_codecs.py ))Aahz aahz at pythoncraft.com
Sat May 5 17:00:35 CEST 2007
On Fri, May 04, 2007, Guido van Rossum wrote:
>
> [-python-dev]
> 
> On 5/4/07, Fred L. Drake, Jr. <fdrake at acm.org> wrote:
>> On Friday 04 May 2007, M.-A. Lemburg wrote:
>>>
>>> I also suggest making all bytes literals immutable to avoid running
>>> into any issues like the above.
>>
>> +1 from me.
> 
> Rather than adding immutability to bytes objects (which has big
> implementation and type checking implications), consider using
> buffer(b"123") as an immutable bytes literal. You can freely
> concatenate and compare buffer objects with bytes objects.

I'm with MAL and Fred on making literals immutable -- that's safe and
lots of newbies will need to use byte literals early in their Python
experience if they pick up Python to operate on network data.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Look, it's your affair if you want to play with five people, but don't
go calling it doubles."  --John Cleese anticipates Usenet
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