Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72462
| Date | 2014-06-02 20:39 -0800 |
|---|---|
| From | Deb Wyatt <codemonkey@inbox.com> |
| Subject | can someone explain the concept of "strings (or whatever) being immutable" |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10586.1401770367.18130.python-list@python.org> (permalink) |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD><META http-equiv=Content-Type content="text/html; charset=utf-8"><META content="INBOX.COM" name=GENERATOR></HEAD> <BODY> a_string = "This is a string"<div>a_string is pointing to the above string</div><div><br></div><div>now I change the value of a_string</div><div>a_string = "This string is different"</div><div>I understand that now a_string is pointing to a different string than it was before, in a different location.</div><div><br></div><div>my question is what happens to the original string?? Is it still in memory somewhere, nameless?</div><div>Thanks in advance,</div><div><br></div><hr size="1px" noshade style="clear:both;margin-top:10px;height:1px;"> <div style="font:12px Verdana,sans-serif;color:Black;background:white;padding:3px;line-height:1.3em"> <a href="http://www.inbox.com/marineaquarium"><img src="http://my.inbox.com/img/ftrs/marine.jpg" width="104" hight="90" alt="3D Marine Aquarium Screensaver Preview" align="left" border="0" style="margin-right:15px" /></a> <br><strong><font color="2086c3">Free 3D Marine Aquarium Screensaver</font></strong><br> <nobr>Watch dolphins, sharks & orcas on your desktop!</nobr> <nobr>Check it out at <a href="http://www.inbox.com/marineaquarium">www.inbox.com/marineaquarium</a></nobr></div> </BODY> </HTML>
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
can someone explain the concept of "strings (or whatever) being immutable" Deb Wyatt <codemonkey@inbox.com> - 2014-06-02 20:39 -0800
csiph-web