<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 14, 2018 at 10:25 AM, David Mertz <span dir="ltr"><<a href="mailto:mertz@gnosis.cx" target="_blank">mertz@gnosis.cx</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Great work! There are a few typos, I'll try to get to a PR on those.<div dir="auto"><br></div><div dir="auto">I wonder if it's worth noting that None is a singleton, while 42 is just a value. I.e. there might be several distinct objects that happen to be the int 42, but not so with None.</div></div></blockquote><div><br></div><div>very much worth nothing -- and I think re-wording that example. The fact that you can't assign to None is orthogonal to the fact that it's immutable.</div><div><br></div><div>in fact, [42] is a llteral for a list with one element, the integer with the value of 42 in it. It is very much a mutable. and yet:</div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">In [7]: [42] = 34</font></div><div><font face="monospace, monospace"> File "<ipython-input-7-b919f2b4d30d>", line 1</font></div><div><font face="monospace, monospace"> [42] = 34</font></div><div><font face="monospace, monospace">SyntaxError: can't assign to literal </font><br></div><div> </div>whereas:<br><br><font face="monospace, monospace">[5].append(3)</font><br><br></div><div class="gmail_quote">works -- at least it does not result in an error -- even though it's useless.<div><br></div><div>And the reason this matters is that name binding (and rebinding) is very much a different operation than mutating -- we should not conflate those.</div><div><br></div><div>-CHB</div><div><br></div><div><br></div></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R (206) 526-6959 voice<br>7600 Sand Point Way NE (206) 526-6329 fax<br>Seattle, WA 98115 (206) 526-6317 main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>