On Wed, Aug 19, 2015 at 6:33 PM, MRAB <pyt...@mrabarnett.plus.com> wrote:
> Well, that depends on the intention. > > Is it checking whether the dictionary is empty, or whether it's an > empty dictionary (and not, say, an empty list)? > 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 if mydict or not isinstance(mydict, list): blah blah blah Skip
-- https://mail.python.org/mailman/listinfo/python-list