[Python-Dev] datetime module enhancements

Jon Ribbens jon+python-dev at unequivocal.co.uk
Mon Mar 12 02:09:37 CET 2007

Steven Bethard <steven.bethard at gmail.com> wrote:
> I was trying to minimize the extent of this already too long thread,
> assuming you could go do the reading I referred you to if you were
> really interested in the answer.

There's nothing to be gained by being patronising.

> I still encourage you to read the reference, but for your sake,
> here's a brief example of temporal logic that would break::
>     We know that:
>     date(2006, 1, 1) *Includes* datetime(2006, 1, 1, 0, 0, 1)

Oh dear. You've fallen at the first hurdle. We do not know that.
You are assuming the answer you want and then using it as an axiom.
Your justification for this assumption was the whole point of my
question, but you have again failed to answer. I don't know how much
clearer I can make this, given that I have explicitly mentioned it
several times already.

> Hope that helps,

No, it doesn't.

Seriously, please try and understand this. I get that you wish Python
datetime was the ultra-complete temporal logic module you want it to
be. Good for you. I sympathise. If it was, I would agree with you. But
it isn't. It's a simple module for dealing with calendar dates and
times, not intervals in time. It makes pragmatic assumptions about
what people mean when they use date arithmetic. They might not be the
assumptions you want, but then it's probably not the module you want.

More information about the Python-Dev mailing list