summaryrefslogtreecommitdiffstats
path: root/Doc/library/decimal.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-03 19:44:48 (GMT)
committerGeorg Brandl <georg@python.org>2009-01-03 19:44:48 (GMT)
commitaa5bb329fd16f30ea39202811290aad27a98412f (patch)
tree8d8f77ebf96f47bc0b7a2e46b27d68ed79ba54bf /Doc/library/decimal.rst
parent69bd8d2189116565d07fa90d9d4179e94cc7b8d9 (diff)
downloadcpython-aa5bb329fd16f30ea39202811290aad27a98412f.zip
cpython-aa5bb329fd16f30ea39202811290aad27a98412f.tar.gz
cpython-aa5bb329fd16f30ea39202811290aad27a98412f.tar.bz2
Make indentation consistent.
Diffstat (limited to 'Doc/library/decimal.rst')
-rw-r--r--Doc/library/decimal.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index f5d21cb..7dc1445 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -1030,7 +1030,7 @@ In addition to the three supplied contexts, new contexts can be created with the
If the argument is a string, no leading or trailing whitespace is
permitted.
-.. method:: create_decimal_from_float(f)
+ .. method:: create_decimal_from_float(f)
Creates a new Decimal instance from a float *f* but rounding using *self*
as the context. Unlike the :method:`Decimal.from_float` class method,
@@ -1039,14 +1039,14 @@ In addition to the three supplied contexts, new contexts can be created with the
.. doctest::
- >>> context = Context(prec=5, rounding=ROUND_DOWN)
- >>> context.create_decimal_from_float(math.pi)
- Decimal('3.1415')
- >>> context = Context(prec=5, traps=[Inexact])
- >>> context.create_decimal_from_float(math.pi)
- Traceback (most recent call last):
- ...
- Inexact: None
+ >>> context = Context(prec=5, rounding=ROUND_DOWN)
+ >>> context.create_decimal_from_float(math.pi)
+ Decimal('3.1415')
+ >>> context = Context(prec=5, traps=[Inexact])
+ >>> context.create_decimal_from_float(math.pi)
+ Traceback (most recent call last):
+ ...
+ Inexact: None
.. versionadded:: 2.7