Names changed to protect the guilty
horpner at yahoo.com
Sat Oct 7 03:34:48 CEST 2006
On 2006-10-07, John Machin <sjmachin at lexicon.net> wrote:
> MonkeeSage wrote:
>> On Oct 6, 8:02 pm, "MonkeeSage" <MonkeeS... at gmail.com> wrote:
>> > it is clearer to you to make the condition explicit ("blah not False"),
>> "blah not False" -> "blah is False"
> Whichever way your team wants to interpret it, d00d.
> Please consider whether you should be writing "(blah is False)
> is True", that would be more explicit.
OK, now we're entering Daily WTF territory. ;)
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.
More information about the Python-list