diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-11-07 11:26:24 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-11-07 11:26:24 (GMT) |
commit | d6b83d3a25f423748f53229bce1d25844677c3ea (patch) | |
tree | a6499856167f5726eaf361b42a9a7029fccff056 | |
parent | 16562f41b09a4440182ff6877e75b8e5065ee9db (diff) | |
download | cpython-d6b83d3a25f423748f53229bce1d25844677c3ea.zip cpython-d6b83d3a25f423748f53229bce1d25844677c3ea.tar.gz cpython-d6b83d3a25f423748f53229bce1d25844677c3ea.tar.bz2 |
Merged revisions 86286 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86286 | mark.dickinson | 2010-11-07 11:24:44 +0000 (Sun, 07 Nov 2010) | 1 line
Issue 10297: Add missing import in decimal example snippet.
........
-rw-r--r-- | Doc/library/decimal.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index 5667bd2..758dcce 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -51,6 +51,7 @@ arithmetic. It offers several advantages over the :class:`float` datatype: alterable precision (defaulting to 28 places) which can be as large as needed for a given problem: + >>> from decimal import * >>> getcontext().prec = 6 >>> Decimal(1) / Decimal(7) Decimal('0.142857') |