prePEP: Decimal data type

Jp Calderone exarkun at intarweb.us
Wed Nov 5 18:25:28 EST 2003


On Wed, Nov 05, 2003 at 01:55:09PM -0500, Aahz wrote:
> In article <bob8a4$1bmvct$1 at ID-11957.news.uni-berlin.de>,
> Emile van Sebille <emile at fenx.com> wrote:
> >
> >The Context still needs to be defined, but Aahz says:
> >> Context applies only to operations, not to Decimal instances;
> >> changing the Context does not affect existing instances if
> >> there are no operations on them.
> >
> >...from which I infer that Context exists in part to limit/round
> >calculated results.  Even if it were possible for me, as a user of
> >Decimal, to set Context appropriately to achieve these ends, what
> >if I use a library that also changes Context?  The integrity of my
> >calculations may be impacted.
> 
> That's correct.  There needs to be a social convention that libraries
> intended for use by other people *CANNOT* muck with Context, and if they
> do so for their own internal calculations, they must save and restore
> Context.  You can probably find additional information about this in
> Cowlishaw.

  Enter the context stack.

  Jp






More information about the Python-list mailing list