summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-05-17 15:57:00 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-05-17 15:57:00 (GMT)
commitb0c854d6a747cd64ff7b23b8e9f9ef93ff8ac0ac (patch)
tree367f74e70138c99155a965da3707f05d8095ecdc /Misc
parent108c40c74c5f3169b9095b464b3e868171571ff6 (diff)
downloadcpython-b0c854d6a747cd64ff7b23b8e9f9ef93ff8ac0ac.zip
cpython-b0c854d6a747cd64ff7b23b8e9f9ef93ff8ac0ac.tar.gz
cpython-b0c854d6a747cd64ff7b23b8e9f9ef93ff8ac0ac.tar.bz2
datetime.timedelta is now subclassable in Python. The new test shows
one good use: a subclass adding a method to express the duration as a number of hours (or minutes, or whatever else you want to add). The native breakdown into days+seconds+us is often clumsy. Incidentally moved a large chunk of object-initialization code closer to the top of the file, to avoid worse forward-reference trickery.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS4
1 files changed, 2 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index e182845..02f845d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,8 +26,8 @@ Core and builtins
Extension modules
-----------------
-- The datetime.datetime and datetime.time classes are now properly
- subclassable.
+- The datetime module classes datetime, time, and timedelta are now
+ properly subclassable.
- _tkinter.{get|set}busywaitinterval was added.