[Python-checkins] r81716 - python/branches/py3k-cdecimal/Modules/cdecimal/docstrings.h
stefan.krah
python-checkins at python.org
Sat Jun 5 09:54:56 CEST 2010
Author: stefan.krah
Date: Sat Jun 5 09:54:55 2010
New Revision: 81716
Log:
1) Document IEEEContext().
2) Example code should pass doctests.
Modified:
python/branches/py3k-cdecimal/Modules/cdecimal/docstrings.h
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/docstrings.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/docstrings.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/docstrings.h Sat Jun 5 09:54:55 2010
@@ -34,6 +34,13 @@
the current default context is used.\n\
\n");
+PyDoc_STRVAR(doc_ieee_context,"\n\
+IEEEContext(bits) - Return a context object initialized to the proper values for\n\
+one of the IEEE interchange formats. The argument must be a multiple of 32 and\n\
+less than IEEE_CONTEXT_MAX_BITS. For the most common values, the constants\n\
+DECIMAL32, DECIMAL64 and DECIMAL128 are provided.\n\
+\n");
+
/******************************************************************************/
/* Decimal Object and Methods */
@@ -552,10 +559,11 @@
Over/Underflow, raising of exceptions and much more. A new context\n\
can be constructed as follows:\n\
\n\
- >>> c = Context(prec=28, Emin=-425000000, Emax=425000000, \n\
- rounding=ROUND_HALF_EVEN, capitals=1,\n\
- traps=[InvalidOperation, DivisionByZero, Overflow],\n\
- flags=[], _clamp=0, _allcr=1)\n\
+ >>> c = Context(prec=28, Emin=-425000000, Emax=425000000,\n\
+ ... rounding=ROUND_HALF_EVEN, capitals=1, clamp=1,\n\
+ ... traps=[InvalidOperation, DivisionByZero, Overflow],\n\
+ ... flags=[], _allcr=1)\n\
+ >>>\n\
\n\
\n");
More information about the Python-checkins
mailing list