On Sun, Dec 20, 2015 at 5:28 PM, Chris Angelico <rosuav at gmail.com> wrote: > > A helpful trivia: a year is approximately π times 10 million seconds. > > Sadly doesn't help here, as the timedelta for a number of years looks like > this: > > >>> datetime.timedelta(days=365*11) > datetime.timedelta(4015) > > The original issue was how long is a million seconds. The bit of trivia that I suggested helps to establish that it cannot be a multiple of years. > Would there be value in changing the repr to use keyword arguments? > I don't think translating from seconds to years will be any simpler with any alternative repr, but I would really like to see a change in the repr of negative timedeltas: >>> timedelta(minutes=-1) datetime.timedelta(-1, 86340) And str() is not much better: >>> print(timedelta(minutes=-1)) -1 day, 23:59:00 The above does not qualify as a human readable representation IMO. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20151220/4cbac1eb/attachment.html>
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