[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-11-17 Thread Erik Cederstrand
Erik Cederstrand added the comment: There are two conflicting interests: ISO 8601 that allows non-precise durations, and timedelta that assumes precise durations. For me, the non-precise durations only make sense in date arithmetic - to a human, it's pretty clear what adding 3 months or a

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-11-17 Thread Paul Ganssle
Paul Ganssle added the comment: This is probably more feasible than the proposal in bpo-41254 since it's a well-defined spec (mostly — it includes an optional alternative format and the number of digits allowed is defined "by agreement", thus defeating the purpose of using a spec in the

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-11-17 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-10-20 Thread Martin Panter
Martin Panter added the comment: There is related discussion in Issue 41254, about duration formats more generally. -- nosy: +martin.panter ___ Python tracker ___

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-10-20 Thread Erik Cederstrand
Erik Cederstrand added the comment: Among other things, ISO 8601 duration strings are commonly used to communicate offset values in timezone definitions. -- ___ Python tracker

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-10-20 Thread Erik Cederstrand
New submission from Erik Cederstrand : Python 3.7 gained support for parsing ISO 8601 formatted time, date and datetime strings via the fromisoformat() methods. Python has seen improved support for ISO 8601 in general; ISO calendar format codes were added in Python 3.6, and fromisocalendar()