• Tim Peters's avatar
    datetime.timedelta is now subclassable in Python. The new test shows · b0c854d6
    Tim Peters authored
    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.
    b0c854d6
datetimemodule.c 130 KB