]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41205: Document Decimal power 0 to the 0 (GH-21386)
authorSrinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
Sun, 19 Jul 2020 11:03:43 +0000 (16:33 +0530)
committerGitHub <noreply@github.com>
Sun, 19 Jul 2020 11:03:43 +0000 (13:03 +0200)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Doc/library/decimal.rst

index 38ad04177c5e894e744af6b41c8a58b6d09db643..e194649e30d85c0095f7fc5f434574dab6d817eb 100644 (file)
@@ -1357,6 +1357,9 @@ In addition to the three supplied contexts, new contexts can be created with the
       The rounding mode of the context is used. Results are always correctly-rounded
       in the Python version.
 
+      ``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if ``InvalidOperation``
+      is not trapped, then results in ``Decimal('NaN')``.
+
       .. versionchanged:: 3.3
          The C module computes :meth:`power` in terms of the correctly-rounded
          :meth:`exp` and :meth:`ln` functions. The result is well-defined but