[Python-Dev] datetime +/- scalars (int, long, float)?
Michael Hudson
mwh@python.net
04 Mar 2002 13:48:43 +0000
Kevin Jacobs <jacobs@penguin.theopalgroup.com> writes:
> On Mon, 4 Mar 2002, Guido van Rossum wrote:
> > > You should name the type timestamp if you want to imply dt + n
> > > == dt + n seconds. datetime + n is commonly understood as
> > > dt + n *days*.
> [...]
> > Is this just an mxDateTime convention, or is it in wider use? (URLs
> > of docs of other languages / libraries would really help to convince
> > me!)
>
> I'm afraid that this really is the de-facto standard. However, lets be
> clear; is t=t+1 adding 1 (calendar) day or 24 hours (86400 seconds)?
Wouldn't this fall into the "explicit is better than implicit" bin?
I.e. t + 1 should be an error?
Cheers,
M.
--
US elections
For those of you fearing that the rest of the world might be
making fun of the US because of this: Rest assured, we are.
-- http://www.advogato.org/person/jameson/diary.html?start=12