A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-March/133663.html below:

[Python-Dev] Negative timedelta strings

[Python-Dev] Negative timedelta strings [Python-Dev] Negative timedelta stringsAlexander Belopolsky alexander.belopolsky at gmail.com
Fri Mar 28 17:07:51 CET 2014
On Fri, Mar 28, 2014 at 7:03 AM, Steven D'Aprano <steve at pearwood.info>
wrote:

> 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. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140328/b0085646/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4