YADTR (Yet Another DateTime Rant)

Terry Reedy tjreedy at udel.edu
Thu Mar 27 17:10:30 EDT 2014


On 3/27/2014 7:42 AM, Chris Angelico wrote:

> In any case... what I'd suggest would be opening a tracker issue, or
> discussing this on python-ideas, and seeing what core devs think of
> the matter. I think that, on balance, it's probably better to show the
> whole thing with the same sign; but should it be:

Before doing so, I suggest looking for the design discussion either on 
the tracker or in python-ideas or py-dev lists.


>>>> str(datetime.timedelta(-1, -1))
> '-1 day, 00:00:01'
>
> or should the hyphen be repeated:
>
>>>> str(datetime.timedelta(-1, -1))
> '-1 day, -00:00:01'

'-(1 day, 00:00:01)' should be unambiguous.

-- 
Terry Jan Reedy




More information about the Python-list mailing list