[Python-checkins] r68214 - python/trunk/Doc/library/decimal.rst
georg.brandl
python-checkins at python.org
Sat Jan 3 20:44:48 CET 2009
Author: georg.brandl
Date: Sat Jan 3 20:44:48 2009
New Revision: 68214
Log:
Make indentation consistent.
Modified:
python/trunk/Doc/library/decimal.rst
Modified: python/trunk/Doc/library/decimal.rst
==============================================================================
--- python/trunk/Doc/library/decimal.rst (original)
+++ python/trunk/Doc/library/decimal.rst Sat Jan 3 20:44:48 2009
@@ -1030,7 +1030,7 @@
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 @@
.. 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
More information about the Python-checkins
mailing list