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

rusi rustompmody at gmail.com
Sat Dec 24 22:22:37 EST 2011


On Dec 25, 5:32 am, Devin Jeanpierre <jeanpierr... at gmail.com> wrote:
> alex23 wrote:
> > 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.

Thats hitting the nail on the head.

>
> 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?

The confusion is not about mutability. Its about mutability and
parameter passing being non-orthogonal.

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

Obviously that would depend on what the change is.



More information about the Python-list mailing list