def __add__(self, other):
if self and isinstance(other, (datetime.timedelta)):
t = self._time
t = datetime.datetime(2012, 6, 27, t.hour, t.minute, t.second, t.microsecond)
t += other
return Time(t.hour, t.minute, t.second, t.microsecond)
else:
return NotImplemented
评论列表
文章目录