[issue3250] datetime.time does not support arithmetic

George Boutsioukis report at bugs.python.org
Fri Jul 4 17:01:04 CEST 2008


George Boutsioukis <gboutsioukis at gmail.com> added the comment:

Hi Chris,
 
 I know copy-pasted sounds horrible--perhaps I should have said 'modeled
afterwards'(better marketing;). The thing is, the datetime & time
classes share a lot of common functionality; it is inevitable that some
code looks like it's repeated, because the same process is followed(take
a look at the datetime & date functions already there). 
 I can't see much room for refactoring the arithmetic functions across
classes(seems too messy). Besides, the existing timezone, normalization
and delta functions are used, so no significant logic is repeated.The
patch indeed requires some cleanup, but overall it's good code(and not a
lot of it). 
 I submitted it without tests/doc because I think there should be a
chance for this functionality to be discussed. Also, the datetime module
looks like for some reason these functions were left out(some discussion
I'm missing?).

So before investing any more time on this some feedback would be
appreciated.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3250>
_______________________________________


More information about the Python-bugs-list mailing list