Help with some python homework...
Gregory Ewing
greg.ewing at canterbury.ac.nz
Fri Jan 31 05:46:36 EST 2014
Chris Angelico wrote:
> OP is using 2.7.6, so short of a __future__ directive, that won't
> actually give 6 seconds in hours
Oops, yes, you're right! (I always use future division
these days, so I tend to forget about that.)
> and // is unnecessary.
It's still a good habit to get into, though, since it
will continue to work in 3.x, and in 2.x it makes the
intent of the code clear without having to know
whether from __future__ import division is in effect.
--
Greg
More information about the Python-list
mailing list