mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue 10297: Add missing import in decimal example snippet.
This commit is contained in:
parent
cdc8cdd215
commit
43ef32ae36
1 changed files with 1 additions and 0 deletions
|
@ -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
|
alterable precision (defaulting to 28 places) which can be as large as needed for
|
||||||
a given problem:
|
a given problem:
|
||||||
|
|
||||||
|
>>> from decimal import *
|
||||||
>>> getcontext().prec = 6
|
>>> getcontext().prec = 6
|
||||||
>>> Decimal(1) / Decimal(7)
|
>>> Decimal(1) / Decimal(7)
|
||||||
Decimal('0.142857')
|
Decimal('0.142857')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue