if not x:
do_something()
Where do_something will occur if x is None, zero, 0.0, a blank string or even midnight in some versions of python.This has bitten me multiple times. It's a violation of python's explicit over implicit. It's an example of weak typing in an otherwise strongly typed language. There's really no good reason for it.
IMO, if x isn't a boolean, that line should just throw an exception. If you want to check for x being 0.0 or "", you should do x == "" or x == 0.0.