<br><br><div class="gmail_quote">On Fri, Jan 23, 2009 at 6:49 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@remove-this-cybersource.com.au">steve@remove-this-cybersource.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Fri, 23 Jan 2009 14:58:34 -0500, Gerald Britton wrote:<br>
<br>
> Hi -- Some time ago I ran across a comment recommending using <var> is<br>
> None instead of <var> == None (also <var> is not None, etc.)<br>
<br>
That entirely depends on whether you wish to test for something which<br>
*is* None or something with *equals* None. Those two things have<br>
different meanings.<br>
<br>
I wonder, do newbies actually get the impression from somewhere that "is"<br>
is a synonym for "=="?<br>
</blockquote><div><br><br> I think it's more that teachers tell students without programming experience "always use == to test if something equals something else unless you're checking for None," without explaining what == and is actually mean.<br>
</div></div>