How to get milliseconds when substructing datetime objects?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Thu Dec 13 13:22:02 EST 2007
En Thu, 13 Dec 2007 14:07:10 -0300, Dmitri O.Kondratiev
<dokondr at gmail.com> escribi�:
> While looking for ready to use library I have roughly skteched the
> functions
> that I need:
They look fine to me. Just one thing:
> days = micros / oneDayMicros # whole number of days
It's safer to use // when you want integer division. The meaning of the /
operator will change in a future Python version:
py> 1/2
0
py> 1//2
0
py> from __future__ import division
py> 1/2
0.5
py> 1//2
0
--
Gabriel Genellina
More information about the Python-list
mailing list