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.

Author martin.panter
Recipients belopolsky, eric.smith, martin.panter, p-ganssle, tebeka
Date 2020-07-09.13:02:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594299769.7.0.458229398438.issue41254@roundup.psfhosted.org>
In-reply-to
Content
I don't know how much support this will get since there is already a str(timedelta) operation defined with a different format. But I don't like that format much. The day[s] part is too verbose, the H:MM:SS part could too easily be interpreted as D:HH:MM, and the result for negative deltas is horrible (-43 days, 23:59:55; see Issue 38701).

My favourite format for a duration is usually the HTML 5 format like

1w 0d 12h 0m 27s

Another option is ISO 8601 format:

P1W0DT12H0M27S

But both of these standards only go down to the seconds unit, so 50 ms has to be 0.05s or PT0.05S.
History
Date User Action Args
2020-07-09 13:02:49martin.pantersetrecipients: + martin.panter, tebeka, belopolsky, eric.smith, p-ganssle
2020-07-09 13:02:49martin.pantersetmessageid: <1594299769.7.0.458229398438.issue41254@roundup.psfhosted.org>
2020-07-09 13:02:49martin.panterlinkissue41254 messages
2020-07-09 13:02:49martin.pantercreate