Early and late binding [was Re: what does 'a=b=c=[]' do]

Devin Jeanpierre jeanpierreda at gmail.com
Sat Dec 24 19:32:06 EST 2011


> Because I believe that the source of confusion has far more to do with
> mutable/immutable objects than with early/late binding. Masking or
> 'correcting' an aspect of Python's behaviour because novices make the
> wrong assumption about it just pushes the problem elsewhere and
> potentially makes the language inconsistent at the same time.

That seems fairly silly -- foo.append(bar) obviously mutates
_something_ . Certainly it wasn't the source of my confusion when I
got caught on this. What makes you believe that the fundamental
confusion is about mutability?

(Also, if the change is applied everywhere, the language would not be
inconsistent.)

-- Devin

On Sat, Dec 24, 2011 at 7:10 PM, alex23 <wuwei23 at gmail.com> wrote:
> On Dec 25, 9:25 am, Devin Jeanpierre <jeanpierr... at gmail.com> wrote:
>> > If Python was ever 'fixed' to prevent this issue, I'm pretty sure we'd
>> > see an increase in the number of questions like the OP's.
>>
>> What makes you so sure? Both models do make sense and are equally
>> valid, it's just that only one of them is true. Is it just because
>> people already used to Python would get confused?
>
> Because I believe that the source of confusion has far more to do with
> mutable/immutable objects than with early/late binding. Masking or
> 'correcting' an aspect of Python's behaviour because novices make the
> wrong assumption about it just pushes the problem elsewhere and
> potentially makes the language inconsistent at the same time.
> --
> http://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list