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 vstinner
Recipients belopolsky, martin.panter, musically_ut, r.david.murray, serhiy.storchaka, tim.peters, vstinner
Date 2017-07-03.11:08:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499080082.86.0.092109802948.issue30302@psf.upfronthosting.co.za>
In-reply-to
Content
> Furthermore, "seconds=28747" is not that user-friendly. A friendlier representation would be "hours=7, minutes=59, seconds=7" and similar information is displayed when you print a timedelta: (...)

I agree that seconds=28747 is not that user-friendly, *but* maybe it shows a flaw in timedelta design?

Maybe timedelta should only expose properties which would *compute* hours, minutes, etc. from an internal storage? But if we change timedelta.seconds value, it is likely to break the backward compatibility. I wrote my own total_seconds() function which uses days, seconds and microseconds fields.

Or maybe we need a new method to convert a timedelta into a more human friendly (named)tuple?
History
Date User Action Args
2017-07-03 11:08:02vstinnersetrecipients: + vstinner, tim.peters, belopolsky, r.david.murray, martin.panter, serhiy.storchaka, musically_ut
2017-07-03 11:08:02vstinnersetmessageid: <1499080082.86.0.092109802948.issue30302@psf.upfronthosting.co.za>
2017-07-03 11:08:02vstinnerlinkissue30302 messages
2017-07-03 11:08:02vstinnercreate