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/2005-May/053965.html below:

[Python-Dev] Adventures with Decimal

[Python-Dev] Adventures with Decimal [Python-Dev] Adventures with DecimalGuido van Rossum gvanrossum at gmail.com
Fri May 20 23:45:40 CEST 2005
It looks like if you pass in a context, the Decimal constructor still
ignores that context:

>>> import decimal as d
>>> d.getcontext().prec = 4
>>> d.Decimal("1.2345678901234567890123456789012345678901234567890000",
d.getcontext())
Decimal("1.2345678901234567890123456789012345678901234567890000")
>>> 

I think this is contrary to what some here have claimed (that you
could pass an explicit context to cause it to round according to the
context's precision).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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