]> granicus.if.org Git - python/commitdiff
Add missing docstring for Context.divmod. Thanks Juan José Conti.
authorMark Dickinson <dickinsm@gmail.com>
Wed, 6 Jan 2010 16:20:22 +0000 (16:20 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Wed, 6 Jan 2010 16:20:22 +0000 (16:20 +0000)
Lib/decimal.py

index 83933651d21ab8a2a220f33365a3b00ad784d5f5..4caa4cea79e64d92c9b02d9294c8185f390806b7 100644 (file)
@@ -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):