[Python-checkins] python/nondist/sandbox/datetime doc.txt,1.10,1.11
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
2002年12月05日 09:11:54 -0800
Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv4656
Modified Files:
doc.txt
Log Message:
Documented what the Python implementation actually does for
date +/- timedelta. The C code doesn't yet match, and these behaviors
aren't yet tested.
The Python implementation also has a funky class attribute,
date.timedelta_class, which is used to construct the result of
date-date; it's unclear what the point is, the C implementation
doesn't have this, and it's not tested.
Index: doc.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/doc.txt,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** doc.txt 5 Dec 2002 05:04:09 -0000 1.10
--- doc.txt 5 Dec 2002 17:11:52 -0000 1.11
***************
*** 214,221 ****
timedelta + date1 -> date2
date2 is timedelta.days days removed from the date1, moving forward
! in time if timedelta.days > 0, and date2 - date1 == timedelta.days
! after. timedelta.seconds and timedelta.microseconds are ignored.
! OverflowError is raised if date2.year would be smaller than MINYEAR
! or larger than MAXYEAR.
- date1 - timedelta -> date2
--- 214,221 ----
timedelta + date1 -> date2
date2 is timedelta.days days removed from the date1, moving forward
! in time if timedelta.days > 0, or backward if timedetla.days < 0.
! date2 - date1 == timedelta.days after. timedelta.seconds and
! timedelta.microseconds are ignored. OverflowError is raised if
! date2.year would be smaller than MINYEAR or larger than MAXYEAR.
- date1 - timedelta -> date2
***************
*** 223,227 ****
isn't quite equivalent to date1 + (-timedelta), because -timedelta
in isolation can overflow in cases where date1 - timedelta does
! not.
- date1 - date2 -> timedelta
--- 223,227 ----
isn't quite equivalent to date1 + (-timedelta), because -timedelta
in isolation can overflow in cases where date1 - timedelta does
! not. timedelta.seconds and timedelta.microseconds are ignored.
- date1 - date2 -> timedelta