Message297560
> 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? |
|
Date |
User |
Action |
Args |
2017-07-03 11:08:02 | vstinner | set | recipients:
+ vstinner, tim.peters, belopolsky, r.david.murray, martin.panter, serhiy.storchaka, musically_ut |
2017-07-03 11:08:02 | vstinner | set | messageid: <1499080082.86.0.092109802948.issue30302@psf.upfronthosting.co.za> |
2017-07-03 11:08:02 | vstinner | link | issue30302 messages |
2017-07-03 11:08:02 | vstinner | create | |
|