[Python-Dev] Change the repr for datetime.timedelta (was Re: Asynchronous context manager in a typical network server)
Alexander Belopolsky
alexander.belopolsky at gmail.com
Sun Dec 20 22:30:22 EST 2015
On Sun, Dec 20, 2015 at 10:25 PM, Tim Peters <tim.peters at gmail.com> wrote:
> For
>
> >>> print(timedelta(minutes=-1))
>
> I'd like to see:
>
> -00:01:00
>
> But I wouldn't change repr() - the internal representation is fully
> documented, and it's appropriate for repr() to reflect documented
> internals as directly as possible.
>
Note that in the case of float repr, the consideration of user convenience
did win over "reflect documented
internals as directly as possible."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20151220/95f96f95/attachment.html>
More information about the Python-Dev
mailing list