Author lemburg
Recipients belopolsky, exarkun, lemburg, madison.may, mark.dickinson, pitrou
Date 2013-08-03.16:43:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <51FD333E.7010400@egenix.com>
In-reply-to <1375547530.36.0.773109260979.issue18629@psf.upfronthosting.co.za>
Content
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.
History
Date User Action Args
2013-08-03 16:43:50lemburgsetrecipients: + lemburg, exarkun, mark.dickinson, belopolsky, pitrou, madison.may
2013-08-03 16:43:50lemburglinkissue18629 messages
2013-08-03 16:43:50lemburgcreate