On Sun, Jul 15, 2012 at 4:56 AM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > (For the record, I can only think of one trap for the unwary: time > objects are false at *exactly* midnight.)
Ugh, that's irritating. I can't think of any scenario where I would ever want the semantics "if timeval (is not midnight):". This reinforces the point that if you only want to test whether you have None, you should use "is not None" rather than relying on __bool__. -- http://mail.python.org/mailman/listinfo/python-list