It's a rule of thumb, not a mantra.
I suppose the hilarious way to argue it would be to say that there is an implicit "all other things being equal" in front of each of those.
I suppose the hilarious way to argue it would be to say that there is an implicit "all other things being equal" in front of each of those.
All other things being equal, I see no reason to write code that needlessly introduces potential bugs and maintainability issues by ignoring the rule of thumb that explicit trumps implicit.
The documentation is pretty clear about it:
http://docs.python.org/release/3.3.4/library/stdtypes.html#t...
Which leads to this:
>>> a=object()
>>> bool(a)
True
>>>