<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 12, 2016 at 9:13 AM, Amrith Kumar <span dir="ltr"><<a href="mailto:amrith@tesora.com" target="_blank">amrith@tesora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Chris, Ihar,<br>
<br>
I assumed that this was stylistic based on the fact that in the places where I was seeing it, it seemed to be the case that the LHS was intuitively positive (a length, for example). I did not exhaustively verify this but yes, you are correct, the construct<br>
<br>
        If var<br>
<br>
is the same as  (I believe)<br>
<br>
        if var is not None</blockquote><div><br></div><div>Those two statements are also not the same. 'if var' will be True is 'var' is *only* True values. 'if var is not None' will be True *everything* except None, so 0, '', [], etc. will not pass the first test, but will pass the second. </div></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">David<br>blog: <a href="http://www.traceback.org" target="_blank">http://www.traceback.org</a><br>twitter: <a href="http://twitter.com/dstanek" target="_blank">http://twitter.com/dstanek</a><div>www: <a href="http://dstanek.com" target="_blank">http://dstanek.com</a></div></div>
</div></div>