[EMAIL PROTECTED] wrote:
> >> So is having mutable bytes just a matter of calling them "byte
> >> displays" instead of "byte literals" or does that also require
> >> changing something in the back end?
>
> Martin> It's certainly also an issue of language semantics (i.e. changes
>
>> So is having mutable bytes just a matter of calling them "byte
>> displays" instead of "byte literals" or does that also require
>> changing something in the back end?
Martin> It's certainly also an issue of language semantics (i.e. changes
Martin> to interpreter code). The
>> That's not a literal, it's a display. The difference is that
>> a literal denotes the same object every time it is executed.
>> A display creates a new object every time it is executed.
>> (another difference is that a display is a constructed thing
>> which may contain runtime-computed compone
Steven Bethard wrote:
> Does that mean you want list literals to be immutable too?
There are no "list literals" in Python, only expressions
that construct lists.
You might argue that b"abc" is not a literal either, but
an expression that constructs a bytes object. However, it
*looks* so much lik
On 5/5/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> >> In general, I don't think it's a good idea to have literals
> >> turn into mutable objects, since literals are normally perceived
> >> as being constant.
> >
> > Does that mean you want list literals to be immutable too?
> >
> > lst =
Steven Bethard wrote:
> On 5/5/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote:
>> On 2007-05-04 19:51, Guido van Rossum wrote:
>>> [-python-dev]
>>>
>>> On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote:
On Friday 04 May 2007, M.-A. Lemburg wrote:
> I also suggest making all bytes lit
>> In general, I don't think it's a good idea to have literals
>> turn into mutable objects, since literals are normally perceived
>> as being constant.
>
> Does that mean you want list literals to be immutable too?
>
> lst = ['a', 'b', 'c']
> lst.append('d') # raises an error?
That's no
On 2007-05-05 18:11, Steven Bethard wrote:
> On 5/5/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote:
>> On 2007-05-04 19:51, Guido van Rossum wrote:
>> > [-python-dev]
>> >
>> > On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote:
>> >> On Friday 04 May 2007, M.-A. Lemburg wrote:
>> >> > I also su
On 5/5/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote:
> On 2007-05-04 19:51, Guido van Rossum wrote:
> > [-python-dev]
> >
> > On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote:
> >> On Friday 04 May 2007, M.-A. Lemburg wrote:
> >> > I also suggest making all bytes literals immutable to avoid
On 2007-05-04 19:51, Guido van Rossum wrote:
> [-python-dev]
>
> On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> 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.
10 matches
Mail list logo