[Python-ideas] Please reconsider the Boolean evaluation of midnight

Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Mar 6 03:12:17 CET 2014


On Wed, Mar 5, 2014 at 8:53 PM, Tim Peters <tim.peters at gmail.com> wrote:
>
> That's there because `utcoffset()` is defined to return minutes.

More accurately, it returns "a timedelta object representing a whole number
of minutes":

time.utcoffset()

If tzinfo is None, returns None, else returns self.tzinfo.utcoffset(None),
and raises an exception if the latter doesn’t return None or a timedelta
object representing a whole number of minutes with magnitude less than one
day.

http://docs.python.org/3/library/datetime.html#datetime.time.utcoffset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140305/e9b28b0c/attachment.html>


More information about the Python-ideas mailing list