Message54803
Logged In: YES
user_id=31435
Since the lack of arithmetic on `time` objects is both
intended and documented, this isn't "a bug". I moved this
to the Feature Requests tracker.
The problem with arithmetic on time objects is that it's not
obvious what to do in case of overflow or underflow: wrap
around or raise OverflowError? Either way violates _some_
reasonable expectation. Embed your time in a `datetime`
object and then you can decide what you want to do. For
example, if you want to wrap around,
>>> print (datetime.combine(date.today(), time(hour=0)) -
timedelta(hours=1)).time()
23:00:00
|
|
Date |
User |
Action |
Args |
2007-08-23 16:11:55 | admin | link | issue1487389 messages |
2007-08-23 16:11:55 | admin | create | |
|