Why can't timedeltas be divided?

webograph webograph at eml.cc
Sun Apr 27 14:38:45 CEST 2008


On 2008-04-27 14:18, Jon Ribbens wrote:
> Yes, that's where it was decided that the datetime module was fine 
> that way it is and must not be changed.
could you give me some pointers to that discussion?

i found some discussion about interpretation as intervals [1], casting 
numbers to intervals [2] and vice versa (plus discussion of connection 
to unix timestamps) [3], and arithmetics of time/datetime and timedelta 
[4], on which i agree that those are problematic (some of those also 
touch the problem of time zones).
nevertheless, i fail to see such problems when dividing timedeltas -- 
after all, `delta2 / 5 == delta1` works, so why should not `delta2 / 
delta1 == 5`?

regards
webograph

[1] http://www.mail-archive.com/python-dev@python.org/msg21629.html
[2] http://mail.python.org/pipermail/python-dev/2002-March/020604.html
[3] http://www.mailinglistarchive.com/python-dev@python.org/msg12596.html
[4] http://bugs.python.org/issue1118748



More information about the Python-list mailing list