Lots of Python objects are falsey: empty lists, empty strings, etc. So it's never a good idea to write "if <thing>" when you mean "if <thing> is not None".
This is pretty well-known, I thought.
This is pretty well-known, I thought.
if datetime.time(0, 0, 0):
print "foo"
else:
print "bar"
to print "bar"There's nothing about midnight that makes sense for it to behave as Falase.