INADA Naoki's argument [1] is succinct and insightful. I feel zero value of non abelian group should not mean False in bool context. () + () == () "" + "" == "" 0 + 0 == 0 timedelta() + timedelta() == timedelta() time() + time() => TypeError [1] https://mail.python.org/pipermail/python-ideas/2014-March/02...
But you can make an equally succinct argument in the opposite direction, namely to treat time values as polar coordinates. Then they indeed form an abelian group: a + 0:00 = a 15:00 + 13:00 = 02:00 12:00 + 12:00 = 00:00 The examples are for hours only, but you can extend it for minutes too. Showing that time values on a clock forms an abelian group under addition is a textbook example everyone uses when introducing g…
I'll assume the times you gave were in the UK's timezone. Here they are rewritten to use Germany's timezone.
a + 1:00 = a
16:00 + 14:00 = 03:00
13:00 + 13:00 = 01:00
Still think this makes sense?Time deltas? Then you don't have the timezone or epoch problem. Works fine.
But time stamps? You can't add two time stamps and get a sensible answer.
Time stamps form a torsor, not a group: http://math.ucr.edu/home/baez/torsors.html