]> granicus.if.org Git - python/commit
Issue #2706: Add support for dividing a timedelta by another timedelta.
authorMark Dickinson <dickinsm@gmail.com>
Tue, 20 Apr 2010 22:32:49 +0000 (22:32 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Tue, 20 Apr 2010 22:32:49 +0000 (22:32 +0000)
commit7c186e2a18bf174afd5cccc8c35b7167d05f7e2a
tree1ba75e9cb85d4ab1e0320d3636c1db90d5c8f97e
parent50eb60e6bfedbdad2dda30fa5ce7fe3ce83f7748
Issue #2706:  Add support for dividing a timedelta by another timedelta.

Adds support for the three division operations:

  - timedelta / timedelta -> float
  - timedelta // timedelta -> int
  - timedelta % timedelta -> timedelta

also adds support for divmod(timedelta, timedelta).

Patch by Victor Stinner, adapted for py3k and extended by Alexander
Belopolsky.
Doc/library/datetime.rst
Lib/test/test_datetime.py
Misc/NEWS
Modules/datetimemodule.c