[Python-checkins] r77324 - python/trunk/Lib/decimal.py
mark.dickinson
python-checkins at python.org
Wed Jan 6 17:20:23 CET 2010
Author: mark.dickinson
Date: Wed Jan 6 17:20:22 2010
New Revision: 77324
Log:
Add missing docstring for Context.divmod. Thanks Juan José Conti.
Modified:
python/trunk/Lib/decimal.py
Modified: python/trunk/Lib/decimal.py
==============================================================================
--- python/trunk/Lib/decimal.py (original)
+++ python/trunk/Lib/decimal.py Wed Jan 6 17:20:22 2010
@@ -4051,6 +4051,13 @@
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):
More information about the Python-checkins
mailing list