diff options
Diffstat (limited to 'Doc')
-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 e82929c..d0dedda 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') |