<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 14, 2018 at 10:45 AM, Rhodri James <span dir="ltr"><<a href="mailto:rhodri@kynesim.co.uk" target="_blank">rhodri@kynesim.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 'None is a constant':<br>
<br>
Erm. I think you've got carried away with simplifying this and gone down a blind alley. None is a literal, and like any other literal can't be rebound. </blockquote><div><br></div><div>no, it's not -- None is keyword, and just like any other keyword, it can't be re-bound. However, every other keyword I tried to rebind results in a generic: </div><font face="monospace, monospace"><div class="gmail_quote"><font face="monospace, monospace"><br></font></div>SyntaxError: invalid syntax<br><br>(except None, True, and False)<br><br></font>which I suppose is because while None is a keyword, it can be used pretty much anywhere any other name can be used (as opposed to say, def)<font face="monospace, monospace"><br></font><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Either this entire section is irrelevant or you meant to explain that there is only one "NoneType" object.<br>
<br>
Constant is a bit of a loaded term in Python, and I think you've fallen foul of it here.<br></blockquote><div><br></div><div>yes, I think "singleton" is the word you want here, though it is a bi CS-y :-(</div><div><br></div><div>-CHB</div><div><br></div></div>-- <br><div class="gmail_signature" data-smartmail="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>