summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-01-06 16:23:13 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-01-06 16:23:13 (GMT)
commit875e1e7b7c972f76bf05a7f4caacef47da5c846c (patch)
tree559b97f42368b9c591ffd1cf71a5cd36b137dc20 /Lib
parent5f7dde18aa3bdad7bd9469b0c15d99e03b9a1790 (diff)
downloadcpython-875e1e7b7c972f76bf05a7f4caacef47da5c846c.zip
cpython-875e1e7b7c972f76bf05a7f4caacef47da5c846c.tar.gz
cpython-875e1e7b7c972f76bf05a7f4caacef47da5c846c.tar.bz2
Merged revisions 77326 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77326 | mark.dickinson | 2010-01-06 16:22:15 +0000 (Wed, 06 Jan 2010) | 9 lines Merged revisions 77324 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77324 | mark.dickinson | 2010-01-06 16:20:22 +0000 (Wed, 06 Jan 2010) | 2 lines Add missing docstring for Context.divmod. Thanks Juan José Conti. ........ ................
Diffstat (limited to 'Lib')
-rw-r--r--Lib/decimal.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 3450066..5638bd7 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -4132,6 +4132,13 @@ class Context(object):
return a.__floordiv__(b, context=self)
def divmod(self, a, b):
+ """Return (a // b, a % b)
+
+ >>> ExtendedContext.divmod(Decimal(8), Decimal(3))
+ (Decimal('2'), Decimal('2'))
+ >>> ExtendedContext.divmod(Decimal(8), Decimal(4))
+ (Decimal('2'), Decimal('0'))
+ """
return a.__divmod__(b, context=self)
def exp(self, a):