]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context...
authorabkmystery <36216019+abkmystery@users.noreply.github.com>
Thu, 2 Jan 2025 07:20:31 +0000 (01:20 -0600)
committerGitHub <noreply@github.com>
Thu, 2 Jan 2025 07:20:31 +0000 (09:20 +0200)
Doc/library/decimal.rst
Doc/whatsnew/3.3.rst

index c9a3e448cad063016da48fd4b4d5721205d320e3..185eaf3f721c72160b3f0f4c6da88b15e89ba3a2 100644 (file)
@@ -1033,7 +1033,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
@@ -1044,7 +1044,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
@@ -1057,7 +1057,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 f814c4e90d571901c23fd5e9a087b35db5a84c5a..7a8eb47cbdb354e7fe23fbae630448d81df086aa 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``.