Message 106290 - Python tracker (original) (raw)

I'm busy implementing the IEEE754 contexts for cdecimal. To keep things in sync, it would be nice to agree how they should be created.

Suggestions:

  1. c = Decimal64Context

  2. c = Context(Decimal64)

  3. ?

I have a preference for 2). It's clear that you get a new Object and the user does not have to wonder if a template context will be contaminated when using setcontext(Decimal64Context).

(I know there are measures against that, but setcontext( Context(Decimal64)) is explicit rather than implicit.)