-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: decimal.BasicContext etc. are not classes #128349
Comments
@rhettinger decimal expert |
This looks as a bug for me, indeed: >>> inspect.isclass(decimal.BasicContext)
False
>>> inspect.isclass(decimal.Context)
True BTW, in the sphinx docs |
We should change
So we should assume that these are not meant to be classes at all (if someone was wondering whether they could act as such) |
…ned decimal `Context` objects (pythonGH-128379) (cherry picked from commit 60c6518) Co-authored-by: abkmystery <36216019+abkmystery@users.noreply.github.com>
…ned decimal `Context` objects (pythonGH-128379) (cherry picked from commit 60c6518) Co-authored-by: abkmystery <36216019+abkmystery@users.noreply.github.com>
…ned decimal `Context` objects (python#128379)
Documentation
The
decimal
module exports three constantsBasicContext
,ExtendedContext
andDefaultContext
, which are instances ofContext
:The documentation of module
decimal
is misleading by containing these 3 declarations:This made me think that these are subclasses of
Context
that need to be instantiated like this:I would expect the declarations to look more like the ones e.g. under Rounding modes.
Linked PRs
.. data::
instead of.. class::
for pre-defined decimalContext
objects #128379.. data::
instead of.. class::
for pre-defined decimalContext
objects (GH-128379) #128401.. data::
instead of.. class::
for pre-defined decimalContext
objects (GH-128379) #128402The text was updated successfully, but these errors were encountered: