]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 2 Jan 2025 07:30:39 +0000 (08:30 +0100)
committerGitHub <noreply@github.com>
Thu, 2 Jan 2025 07:30:39 +0000 (07:30 +0000)
gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379)
(cherry picked from commit 60c65184695a3eab766b3bc26fc99f695deb998f)

Co-authored-by: abkmystery <36216019+abkmystery@users.noreply.github.com>
Doc/library/decimal.rst
Doc/whatsnew/3.3.rst

index c5544f6216fd7b1c15c7075d34112d44da0a39d5..2ce4c913ff436495dc562819513f8f6490f2760d 100644 (file)
@@ -1016,7 +1016,7 @@ New contexts can also be created using the :class:`Context` constructor
 described below. In addition, the module provides three pre-made contexts:
 
 
-.. class:: BasicContext
+.. data:: BasicContext
 
    This is a standard context defined by the General Decimal Arithmetic
    Specification.  Precision is set to nine.  Rounding is set to
@@ -1027,7 +1027,7 @@ described below. In addition, the module provides three pre-made contexts:
    Because many of the traps are enabled, this context is useful for debugging.
 
 
-.. class:: ExtendedContext
+.. data:: ExtendedContext
 
    This is a standard context defined by the General Decimal Arithmetic
    Specification.  Precision is set to nine.  Rounding is set to
@@ -1040,7 +1040,7 @@ described below. In addition, the module provides three pre-made contexts:
    presence of conditions that would otherwise halt the program.
 
 
-.. class:: DefaultContext
+.. data:: DefaultContext
 
    This context is used by the :class:`Context` constructor as a prototype for new
    contexts.  Changing a field (such a precision) has the effect of changing the
index 92656090885737fa5af3d38d5c4655a0f6067c1b..f386e05db3696ae64d8d4dc946ace8076a77cc96 100644 (file)
@@ -1147,8 +1147,8 @@ API changes
    | :const:`MIN_EMIN` | ``-425000000`` | ``-999999999999999999`` |
    +-------------------+----------------+-------------------------+
 
-* In the context templates (:class:`~decimal.DefaultContext`,
-  :class:`~decimal.BasicContext` and :class:`~decimal.ExtendedContext`)
+* In the context templates (:const:`~decimal.DefaultContext`,
+  :const:`~decimal.BasicContext` and :const:`~decimal.ExtendedContext`)
   the magnitude of :attr:`~decimal.Context.Emax` and
   :attr:`~decimal.Context.Emin` has changed to ``999999``.