negative numbers and integer division

Matthew Wilson mwilson at sarcastic-horse.com
Fri Oct 3 15:29:29 EDT 2003


> 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.








More information about the Python-list mailing list