3 ms·
It's an old argument. I don't have real strong feelings about it. I think there is enough code doing one or the other out there that the end result is to unders
by maxerickson 13y ago
It's an old argument. I don't have real strong feelings about it. I think there is enough code doing one or the other out there that the end result is to understand well the ramifications of both, so it ends up a matter of taste.
The documentation is pretty clear about it:
http://docs.python.org/release/3.3.4/library/stdtypes.html#truth-value-testing http://docs.python.org/release/3.3.4/library/stdtypes.html#t...
Which leads to this:
>>> a=object()
>>> bool(a)
True
>>>