[Python-Dev] Decimal data type issues (original) (raw)

Batista, Facundo FBatista at uniFON.com.ar
Thu Apr 15 10:53:15 EDT 2004


[Aahz]

#- Correction for precision: all Decimal operations in a thread use the #- same context until the context is changed. Threads inherit #- context from #- their starting thread (I think).

I'm lost. Help me with an example (that later I'll shamelessly stole to use in a test case):

d1 = Decimal('123') d2 = Decimal('456')

So, long, they have the same context, right?

getcontext().prec = 46

The precision should change for both d1 and d2, right?

d3 = Decimal('789')

d3 also has the precision in 46, right?

Thank you!

. Facundo



More information about the Python-Dev mailing list