This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 skip.montanaro
收信人
日期 2005-09-17.01:48:47
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
内容
Logged In: YES 
user_id=44345

>> Thus, I have to either write my own special functions, or convert
>> the timedelta objects to integers first (then convert them back
>> afterwards).

How about adding tolong() that returns the number of microseconds
in the timedelta and fromlong() that accepts a long representing
microseconds and returns a timedelta object?  That way the timedelta
object does a reasonably simple thing and the user is still responsible
for overflow the normal arithmetic stuff.  You can do any sort of
arithmetic operations on the long (including converting to other
numeric types) with all the attendant caveats, then convert back to
a timedelta object at the end.
历史
日期 用户 动作 参数
2007-08-23 14:34:31admin链接issue1289118 messages
2007-08-23 14:34:31admin创建