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

alex23 wuwei23 at gmail.com
Sat Dec 24 09:08:54 EST 2011


On Dec 24, 6:25 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> > It's
> > much harder to figure out what's going wrong with an early-bound
> > mutable.
>
> Only for those who don't understand, or aren't thinking about, Python's
> object model. The behaviour of early-bound mutables is obvious and clear
> once you think about it, but it does require you to think about what's
> going on under the hood, so to speak.

And here we've come full circle to the point of this thread.

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.



More information about the Python-list mailing list