A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-April/044292.html below:

[Python-Dev] Decimal data type issues

[Python-Dev] Decimal data type issues [Python-Dev] Decimal data type issuesBatista, 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4