28 Mar
2014
28 Mar
'14
12:07 p.m.
On Fri, Mar 28, 2014 at 7:03 AM, Steven D'Aprano
py> str(timedelta(0, -1)) '-1 day, 23:59:59' .. Does anyone remember the rationale for this behaviour?
I don't recall any better rationale than what I wrote in the docs: "String representations of timedelta objects are normalized similarly to their internal representation."
Is it open to debate or is it now cast in stone?
I think the barrier for changing str() is lower than that for changing repr(), but I would be against any changes in this area. (I may have had a different view if ISO 8601 syntax for timedeltas was not so ugly. :-)