classification
Title: Document str() and repr() of timedelta.
Type: Stage: patch review
Components: Documentation Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: belopolsky, docs@python, eric.smith, ezio.melotti, georg.brandl, pitrou
Priority: normal Keywords: easy, patch

Created on 2010-07-30 18:57 by belopolsky, last changed 2010-07-31 11:40 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
datetime.rst.diff belopolsky, 2010-07-30 18:57
issue9430.diff belopolsky, 2010-07-31 00:37
Messages (6)
msg112096 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-30 18:57
Attaching a tentative patch.  I think it is better to document these as operations rather than special methods.  It may need to be clarified that "-2 days, 0:00:22" is timedelta(-2, 22) rather than -timedelta(2, 22), but I cannot come up with anything short enough for the ops table.  Maybe this should be done in a footnote.
msg112097 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-07-30 19:18
Adding a footnote with an example sounds like a good idea.
There's an odd number of square brackets in the str(t) description.
msg112110 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-31 00:37
First revision: issue9430.diff
msg112133 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-07-31 11:25
I think it would be clearer if the footnote said something like "Negative 1 day plus 19 hours is equivalent to the timedelta argument of -5 hours)". If I hadn't been following the discussion on #python-dev the point of this doc change would have been lost on me without much closer scrutiny, so a little more explanation would help.
msg112138 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-07-31 11:36
Looks good to me.
msg112141 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-31 11:40
Committed in r83341.
History
Date User Action Args
2010-07-31 11:40:21georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112141

resolution: fixed
2010-07-31 11:36:56pitrousetmessages: + msg112138
2010-07-31 11:25:54eric.smithsetnosy: + eric.smith
messages: + msg112133
2010-07-31 00:37:14belopolskysetfiles: + issue9430.diff

messages: + msg112110
2010-07-30 19:18:46ezio.melottisetnosy: + ezio.melotti

messages: + msg112097
stage: patch review
2010-07-30 19:00:07belopolskysetnosy: + pitrou
2010-07-30 18:57:54belopolskycreate