https://github.com/python/cpython/commit/60c65184695a3eab766b3bc26fc99f695deb998f
commit: 60c65184695a3eab766b3bc26fc99f695deb998f
branch: main
author: abkmystery <[email protected]>
committer: Eclips4 <[email protected]>
date: 2025-01-02T09:20:31+02:00
summary:

gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal 
`Context` objects (#128379)

files:
M Doc/library/decimal.rst
M Doc/whatsnew/3.3.rst

diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index c9a3e448cad063..185eaf3f721c72 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -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
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index f814c4e90d5719..7a8eb47cbdb354 100644
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -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``.
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to