Apr-11-2022, 05:03 PM
The decimal module has a current context which defines the settings used for decimal calculations.
Let's say I have two classes, B and E. In the B class I want all my decimal calculations to use the
Is it possible to define a context for each class, or the whole module, so that I don't have to manually set the context in every method?
Let's say I have two classes, B and E. In the B class I want all my decimal calculations to use the
BasicContext
, and in my E class I want them all to use ExtendedContext
.Is it possible to define a context for each class, or the whole module, so that I don't have to manually set the context in every method?