]> granicus.if.org Git - python/commitdiff
Merged revisions 77324 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Wed, 6 Jan 2010 16:22:15 +0000 (16:22 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Wed, 6 Jan 2010 16:22:15 +0000 (16:22 +0000)
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.
........

Lib/decimal.py

index 82d325606e663f3c973276d0ef6f977826fdc42f..d0d54fc6b1326cd3ad588645e6010bb3bcd16ae8 100644 (file)
@@ -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):