File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -254,8 +254,9 @@ Supported operations:
254254| | rounded to the nearest multiple of |
255255| | timedelta.resolution using round-half-to-even.|
256256+--------------------------------+-----------------------------------------------+
257- | ``f = t2 / t3 `` | Division (3) of *t2 * by *t3 *. Returns a |
258- | | :class: `float ` object. |
257+ | ``f = t2 / t3 `` | Division (3) of overall duration *t2 * by |
258+ | | interval unit *t3 *. Returns a :class: `float ` |
259+ | | object. |
259260+--------------------------------+-----------------------------------------------+
260261| ``t1 = t2 / f or t1 = t2 / i `` | Delta divided by a float or an int. The result|
261262| | is rounded to the nearest multiple of |
@@ -351,7 +352,8 @@ Instance methods:
351352.. method :: timedelta.total_seconds()
352353
353354 Return the total number of seconds contained in the duration. Equivalent to
354- ``td / timedelta(seconds=1) ``.
355+ ``td / timedelta(seconds=1) ``. For interval units other than seconds, use the
356+ division form directly (e.g. ``td / timedelta(microseconds=1) ``).
355357
356358 Note that for very large time intervals (greater than 270 years on
357359 most platforms) this method will lose microsecond accuracy.
Original file line number Diff line number Diff line change 1+ Improve documentation about converting datetime.timedelta to scalars.
You can’t perform that action at this time.
0 commit comments