Marc-Andre Lemburg added the comment: On 03.08.2013 18:32, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > What is so special about seconds? Why not days? As in > >>>> timedelta(3) // 2 > timedelta(1) > > > Note that in 3.x we have timedelta over timedelta division that lets you do > floor division in arbitrary time units. > > What is the use case for timedelta // int that rounds down to a second? I > suspect in most cases you really want timedelta // timedelta(seconds=int) > instead.
The notion of fraction in time usually applies to seconds, not days, hours or minutes. Since floor removes fractions, the natural expectation is to have // int apply to seconds, not microseconds (which represent fractions of a second). That said, I don't think having // division on timedeltas is useful at all. I'd be +1 on removing this support and raise a TypeError instead. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18629> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com