Re: time + timedelta

2005-02-07 Thread josh
int *microsecond) { ! normalize_time(day, hour, minute, second, microsecond); return normalize_date(year, month, day); } *** *** 3276,3281 --- 3286,3398 } /* + * Time arithmetic. + */ + + /* time + timedelta -> time. If arg negate is

time + timedelta

2005-02-07 Thread josh
datetime.time should support timedelta arithmetic, patch attached. Times greater than 24 hours should not raise an exception, but always wrap around. Any other behavior is too surprising. (People expect to be able to call you up at 11pm, and say "meet me in two hours" (if you're a night person)).

Re: why no time() + timedelta() ?

2005-01-20 Thread John Machin
Tim Peters wrote: > [josh] > > Why can't timedelta arithmetic be done on time objects? > > Obviously, because it's not implemented . > > > (e.g. datetime.time(5)-datetime.timedelta(microseconds=3) > > > > Nonzero "days" of the timedelta could either be ignored, or > > trigger an exception. > > And

Re: why no time() + timedelta() ?

2005-01-20 Thread Tim Peters
[josh] > Why can't timedelta arithmetic be done on time objects? Obviously, because it's not implemented . > (e.g. datetime.time(5)-datetime.timedelta(microseconds=3) > > Nonzero "days" of the timedelta could either be ignored, or > trigger an exception. And if the result is less than 0, or >= 2

why no time() + timedelta() ?

2005-01-20 Thread josh
Why can't timedelta arithmetic be done on time objects? (e.g. datetime.time(5)-datetime.timedelta(microseconds=3) Nonzero "days" of the timedelta could either be ignored, or trigger an exception. -- http://mail.python.org/mailman/listinfo/python-list