From: Georg Brandl Date: Mon, 22 Aug 2005 19:35:24 +0000 (+0000) Subject: backport bug [ 1266296 ] Mistakes in decimal.Context.subtract documentation X-Git-Tag: v2.4.2c1~93 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d41e9aac7cf4f395a13f65f70f9a407dd180e6f;p=thirdparty%2FPython%2Fcpython.git backport bug [ 1266296 ] Mistakes in decimal.Context.subtract documentation --- diff --git a/Doc/lib/libdecimal.tex b/Doc/lib/libdecimal.tex index 60fb779f5ee7..3a01f1947537 100644 --- a/Doc/lib/libdecimal.tex +++ b/Doc/lib/libdecimal.tex @@ -693,7 +693,7 @@ here. Return the square root to full precision. \end{methoddesc} -\begin{methoddesc}{substract}{x, y} +\begin{methoddesc}{subtract}{x, y} Return the difference between \var{x} and \var{y}. \end{methoddesc} diff --git a/Lib/decimal.py b/Lib/decimal.py index 1d8ed405b079..fe0942e14312 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -2754,7 +2754,7 @@ class Context(object): return a.sqrt(context=self) def subtract(self, a, b): - """Return the sum of the two operands. + """Return the difference between the two operands. >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.07')) Decimal("0.23") diff --git a/Misc/cheatsheet b/Misc/cheatsheet index 071f13d31165..718c77bf2b9d 100644 --- a/Misc/cheatsheet +++ b/Misc/cheatsheet @@ -209,7 +209,7 @@ Highest Operator Comment +x, -x, ~x Unary operators x**y Power x*y x/y x%y x//y mult, division, modulo, floor division - x+y x-y addition, substraction + x+y x-y addition, subtraction x<>y Bit shifting x&y Bitwise and x^y Bitwise exclusive or