I have a Python datetime, d, and I want to get the number of hours since midnight as a floating point number. The best I\'ve come up with is:
h = ((((d.hour
h = (d - d.replace(hour=0,minute=0,second=0)).seconds / 3600.
... has less division and/or multiplication