summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-01-06 16:20:22 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-01-06 16:20:22 (GMT)
commit202eb9094cc9c504adb1ec122a233a3a19b35b7c (patch)
treed10f8d4f7aace70e463a48c8437aa2819143b981 /Lib/decimal.py
parent442879ac71c54a34fc5b9d42e4ae3bc26cbe0b58 (diff)
downloadcpython-202eb9094cc9c504adb1ec122a233a3a19b35b7c.zip
cpython-202eb9094cc9c504adb1ec122a233a3a19b35b7c.tar.gz
cpython-202eb9094cc9c504adb1ec122a233a3a19b35b7c.tar.bz2
Add missing docstring for Context.divmod. Thanks Juan José Conti.
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 8393365..4caa4ce 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -4051,6 +4051,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):