Thanks,<br><br>so I could/should do <br><br>self.ot = Bar(self.name.copy()) instead<br><br><br><div class="gmail_quote">On Jan 21, 2008 9:25 PM, Kent Johnson <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote:
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">John Morris wrote:<br><br>> Why does the pop in the Bar class nuke the srv k & v from
<a href="http://Foo.name" target="_blank">Foo.name</a><br></div>> <<a href="http://Foo.name" target="_blank">http://Foo.name</a>> as well?<br><br>Because they are both names for the same dict.<br><br>Assignment in Python does not copy values; it binds a name to a value.
<br>Some good references:<br><a href="http://effbot.org/zone/python-objects.htm" target="_blank">http://effbot.org/zone/python-objects.htm</a><br><a href="http://groups.google.com/group/comp.lang.python/browse_thread/thread/56e7d62bf66a435c/" target="_blank">
http://groups.google.com/group/comp.lang.python/browse_thread/thread/56e7d62bf66a435c/</a><br><font color="#888888"><br>Kent<br></font></blockquote></div><br><br clear="all"><br>-- <br>John Morris<br><a href="mailto:jrmorrisnc@gmail.com">
jrmorrisnc@gmail.com</a><br>"Do nothing which is of no use." -- Miyamoto Musashi<br><a href="<a href="http://profile.mygamercard.net/nerdality">http://profile.mygamercard.net/nerdality</a>"><br><img src="
<a href="http://card.mygamercard.net/gbar/abyss/nerdality.gif">http://card.mygamercard.net/gbar/abyss/nerdality.gif</a>" border=0><br></a>