<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 19, 2015 at 6:33 PM, MRAB <span dir="ltr"><<a href="mailto:python@mrabarnett.plus.com" target="_blank">python@mrabarnett.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":59v" class="a3s" style="overflow:hidden">Well, that depends on the intention.<br>
<br>
Is it checking whether the dictionary is empty, or whether it's an<br>
empty dictionary (and not, say, an empty list)?</div></blockquote></div><br>Sure, that's a possibility. I would argue that "mydict == {}" is also not the idiomatic way to see if mydict isn't an empty list. For that, you'd use something like </div><div class="gmail_extra"><br></div><div class="gmail_extra">  if mydict or not isinstance(mydict, list):</div><div class="gmail_extra">     blah blah blah</div><div class="gmail_extra"><br></div><div class="gmail_extra">Skip</div><div class="gmail_extra"><br></div></div>