Author tim.peters
Date 2005-09-15.21:04:28
SpamBayes Score
Marked as misclassified
Logged In: YES 

timedelta arithmetic is 100% portable now, and wholly 
explainable in terms of universally understood integer 
arithmetic.  Throw floats into it, and that's lost.

That said, I don't have a strong objection to complicating the 
implementation if there _are_ strong use cases.  The OP's 
example isn't "a use case":  it's not worth anything to let 
someone multiply a timedelta by 0.5 instead of dividing by 2.  
I don't have a use case to offer in its place (never felt a need 

If someone wants to work on it, note that a timedelta can 
contain more than 53 bits of information, so, e.g., trying to 
represent a timedelta as an IEEE double-precision number of 
microseconds can lose information.  This makes a high-
qualty "computed as if to infinite precision with one rounding 
at the end" implementation of mixed datetime/float arithmetic 
tricky to do right.
Date User Action Args
2007-08-23 14:34:30adminlinkissue1289118 messages
2007-08-23 14:34:30admincreate