Hi folks,<br>I&#39;m trying to gain a deeper understanding of why it&#39;s possible to modify list elements in-place *without* replacing them. For instance, why is the below possible?<br><br>&gt;&gt;&gt; class Dummy(object):<br>

...     pass<br>... <br>&gt;&gt;&gt; a = Dummy()<br>&gt;&gt;&gt; b = Dummy()<br>&gt;&gt;&gt; x = [a, b]<br># modify list elements in-place<br>&gt;&gt;&gt; x[1].name = &#39;The Dude&#39;<br>&gt;&gt;&gt; print x[1].name<br>

The Dude<br>&gt;&gt;&gt; x[0].name = &#39;The Stranger&#39;<br>&gt;&gt;&gt; for item in x:<br>...     print <a href="http://item.name" target="_blank">item.name</a><br>...     <br>The Stranger<br>The Dude<br># modify elements by iterating over the list<br>

&gt;&gt;&gt; for item in x:<br>...     item.start_date = 2010<br><br>&gt;&gt;&gt; for item in x:<br>...     print <a href="http://item.name" target="_blank">item.name</a>, item.start_date<br>...     <br>The Stranger 2010<br>
The Dude 2010<br>
<br>I figured the below quote offers the beginning of an explanation on this page:<br>&quot;The list object stores pointers to objects, not the actual objects
    themselves.&quot;<br><a href="http://effbot.org/zone/python-list.htm">http://effbot.org/zone/python-list.htm</a><br><br>But I was hoping you all could provide a more in-depth explanation, or even better, direct me to some other readings and python code that implements this behavior. Can anyone point me in the right direction for further study?<br>

<br>Thanks!<br>Serdar<br>