[Python-ideas] bool(datetime.time(0, 0)) vs missing data

Devin Jeanpierre jeanpierreda at gmail.com
Wed May 9 19:10:32 CEST 2012


On Wed, May 9, 2012 at 12:38 PM, Jim Jewett <jimjjewett at gmail.com> wrote:
> The cyclic groups Z/n have a zero element, so *something* has to be
> effectively zero; start of day is as reasonable as anything else.  Or
> are you just saying that there aren't *any* meaningful binary
> operators on hour-of-the-day, beyond __eq__ and __ne__?

Times are not a group -- there's no addition or multiplication
operator among times. They only add against timedeltas, and timedeltas
are the ones that need a 0 in order for that to work properly in some
sense (since the result is a time).

-- Devin



More information about the Python-ideas mailing list