: On 20 September 2011 14:42, MRAB <pyt...@mrabarnett.plus.com> wrote: > On 20/09/2011 19:13, Kayode Odeyemi wrote: >> >> if item is not {} and timeout is not 0: > > `not {}` has the value True, so `item is not {}` means `item is True`. > The `is` checks for identity, not equality, so this is true only if `item` > actually has the value True or 1 (and this is an implementation-dependent > behaviour).
Nitpick: "is not" is an operator: >>> "foo" is not {} True >>> "foo" is (not {}) False -[]z. -- http://mail.python.org/mailman/listinfo/python-list