On Fri, Sep 11, 2015 at 9:12 PM, Glenn Linderman <v+pyt...@g.nevcal.com> wrote:
> That's what the politicians gave us. These are datetime objects, not > mathematical numbers. That's an argument for not defining mathematical operations like <, > or - on them, but you cannot deny the convenience of having those. Besides, datetime objects are mathematical numbers as long as you only deal with one timezone or restrict yourself to naive instances. The problem with interzone subtraction, for example, is that we start with nice (not so little) integers and define an operation that is effectively op(x, y) = f(x) - g(y) where f and g are arbitrary functions under the control of the politicians. It is convenient to equate op with subtraction and if f and g are simple shifts, it is a subtraction, but in general it is not. This is the root of the problem, but datetime objects are still as close to mathematical numbers as Python ints.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com