On 2006-10-07, MonkeeSage <[EMAIL PROTECTED]> wrote: > > On Oct 6, 8:34 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: >> And in the original case, I'd agree that "if X.has_key():" is >> quite clear, already yielding a boolian value, and so doesn't >> need to be tested for if it's False. But I wouldn't like to >> test for an empty list or for None implicitly. > > I agree that predicates are explicit in themselves, if they are > named intuitively like "has_key". I assumed that the OP was > upset about "is False" not that an explicit check was done on a > predicate method.
And that's something that I'd never have written, and wouldn't have recognized as a bug until this thread. I can hear the gears clicking in there now. Thanks to you and other that explained this bug properly. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list