datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ?

Christos TZOTZIOY Georgiou tzot at
Mon Sep 8 15:00:25 CEST 2003

Is there any reason for datetime.time subtraction not returning a
datetime.timedelta object, just like datetime.datetime subtraction does?
It doesn't feel good having to use dumb year, month, day arguments
constructing datetime object when doing only time arithmetic.

If there is no specific reason apart from lack of time (no pun), I'm
willing to research it and write a patch (I haven't seen the code, but I
believe it would be quite easy).

TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.

More information about the Python-list mailing list