[Python-checkins] CVS: python/nondist/sandbox/datetime datetime.py,1.20,1.21
Tim Peters
tim_one@users.sourceforge.net
Sat, 02 Mar 2002 20:03:24 -0800
Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory usw-pr-cvs1:/tmp/cvs-serv12420
Modified Files:
datetime.py
Log Message:
Bug alert for timedelta.__div__.
Index: datetime.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/datetime.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** datetime.py 3 Mar 2002 03:59:37 -0000 1.20
--- datetime.py 3 Mar 2002 04:03:22 -0000 1.21
***************
*** 217,220 ****
--- 217,222 ----
def __div__(self, other):
if isinstance(other, (int, long)):
+ # XXX If, e.g., this is a delta of 1 day, dividing by 2 and
+ # XXX getting back 0 is pretty surprising.
return timedelta(self.__days // other,
self.__seconds // other,