On Tue, 07 Jul 2009 21:18:53 +0000, kj wrote:

> I had not realized how *profoundly* different the meaning of the "=" in
> Python's
> 
>   spam = ham
> 
> is from the "=" in its
> 
>   spam[3] = ham[3]
> 
> So much for "explicit is better than implicit"...

I'm sorry, I don't get it. Can you explain please? I don't see why it's 
so "profoundly" different. Apart from spam[3] = x not being permitted if 
spam is an immutable type.

I suppose though they are *fundamentally* different, in that spam=ham is 
dealt with by the compiler while spam[3]=ham is handled by the object 
spam using the __setitem__ method. Is that the difference you're talking 
about?


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to