negative numbers and integer division
Pettersen, Bjorn S
BjornPettersen at fairisaac.com
Fri Oct 3 16:28:32 EDT 2003
> From: Matthew Wilson [mailto:mwilson at sarcastic-horse.com]
>
> [timbot]
> > Not really, but because the intended connection between
> (-1, 2001) and
> > (11,
> > 2000) escapes me. That is, I have no idea how to
> generalize that. For
> > example, is (0, 2001) OK as-is, or should that become (12,
> 2000), or ...?
>
>
> I should have spelled out the goal. I want to do stuff like this:
>
> >>> dec99 = mdate(12,1999)
> >>> jan00 = dec99+1
> >>> nov99 = jan00 - 1
> >>> nov99
> (11,1999)
>
> I want to add and subtract integers from my date structure as
> if they were months.
hmmm
dec99+1 == jan00
jan00-1 == nov99
new math?
-- bjorn
More information about the Python-list
mailing list