This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author p-ganssle
Recipients belopolsky, docs@python, ncoghlan, p-ganssle
Date 2019-02-27.14:54:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551279277.78.0.420201199405.issue36138@roundup.psfhosted.org>
In-reply-to
Content
In a recent python-dev thread, there was some confusion about how to get something like `timedelta.total_microseconds()`. There is already an existing, supported idiom for this, which is that `timedelta` implements division:

    td = timedelta(hours=1)
    num_microseconds = td / timedelta(microseconds=1)

In this e-mail ( https://mail.python.org/pipermail/python-dev/2019-February/156351.html ), Nick Coghlan proposed that we update the documentation and there were no objections, quoting:

    * In the "Supported Operations" section of https://docs.python.org/3/library/datetime.html#timedelta-objects,
      change "Division (3) of t2 by t3." to "Division (3) of overall
      duration t2 by interval unit t3."
    * In the total_seconds() documentation, add a sentence "For interval units
      other than seconds, use the division form directly (e.g. `td / timedelta(microseconds=1)`)"


I am starting this issue to track that change.
History
Date User Action Args
2019-02-27 14:54:37p-gansslesetrecipients: + p-ganssle, ncoghlan, belopolsky, docs@python
2019-02-27 14:54:37p-gansslesetmessageid: <1551279277.78.0.420201199405.issue36138@roundup.psfhosted.org>
2019-02-27 14:54:37p-gansslelinkissue36138 messages
2019-02-27 14:54:37p-gansslecreate