summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-01-06 16:21:27 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-01-06 16:21:27 (GMT)
commit8b1587fd63ae3c783a772f86f63593d7f65bb6db (patch)
treef8b7f09ea6aa13df31e2ef91c08bc7a5db0ff8ae /Lib
parent88a0b17d5460c358abcff6be0217998339263e0f (diff)
downloadcpython-8b1587fd63ae3c783a772f86f63593d7f65bb6db.zip
cpython-8b1587fd63ae3c783a772f86f63593d7f65bb6db.tar.gz
cpython-8b1587fd63ae3c783a772f86f63593d7f65bb6db.tar.bz2
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 478ee47..d87bef3 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -3998,6 +3998,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):