LEFT | RIGHT |
1 /* | 1 /* |
2 * Copyright (c) 2001-2010 Python Software Foundation. All Rights Reserved. | 2 * Copyright (c) 2001-2010 Python Software Foundation. All Rights Reserved. |
3 * Modified and extended by Stefan Krah. | 3 * Modified and extended by Stefan Krah. |
4 */ | 4 */ |
5 | 5 |
6 | 6 |
7 #ifndef DOCSTRINGS_H | 7 #ifndef DOCSTRINGS_H |
8 #define DOCSTRINGS_H | 8 #define DOCSTRINGS_H |
9 | 9 |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 setcontext(c) - Set a new default context.\n\ | 27 setcontext(c) - Set a new default context.\n\ |
28 \n"); | 28 \n"); |
29 | 29 |
30 PyDoc_STRVAR(doc_localcontext,"\n\ | 30 PyDoc_STRVAR(doc_localcontext,"\n\ |
31 localcontext(c) - Return a context manager that will set the default context\n\ | 31 localcontext(c) - Return a context manager that will set the default context\n\ |
32 to a copy of c on entry to the with-statement and restore the previous default\n
\ | 32 to a copy of c on entry to the with-statement and restore the previous default\n
\ |
33 context when exiting the with-statement. If no context is specified, a copy of\n
\ | 33 context when exiting the with-statement. If no context is specified, a copy of\n
\ |
34 the current default context is used.\n\ | 34 the current default context is used.\n\ |
35 \n"); | 35 \n"); |
36 | 36 |
| 37 #ifdef EXTRA_FUNCTIONALITY |
37 PyDoc_STRVAR(doc_ieee_context,"\n\ | 38 PyDoc_STRVAR(doc_ieee_context,"\n\ |
38 IEEEContext(bits) - Return a context object initialized to the proper values for
\n\ | 39 IEEEContext(bits) - Return a context object initialized to the proper values for
\n\ |
39 one of the IEEE interchange formats. The argument must be a multiple of 32 and\n
\ | 40 one of the IEEE interchange formats. The argument must be a multiple of 32 and\n
\ |
40 less than IEEE_CONTEXT_MAX_BITS. For the most common values, the constants\n\ | 41 less than IEEE_CONTEXT_MAX_BITS. For the most common values, the constants\n\ |
41 DECIMAL32, DECIMAL64 and DECIMAL128 are provided.\n\ | 42 DECIMAL32, DECIMAL64 and DECIMAL128 are provided.\n\ |
42 \n"); | 43 \n"); |
| 44 #endif |
43 | 45 |
44 | 46 |
45 /******************************************************************************/ | 47 /******************************************************************************/ |
46 /* Decimal Object and Methods */ | 48 /* Decimal Object and Methods */ |
47 /******************************************************************************/ | 49 /******************************************************************************/ |
48 | 50 |
49 PyDoc_STRVAR(doc_decimal,"\n\ | 51 PyDoc_STRVAR(doc_decimal,"\n\ |
50 Decimal([value[, context]]): Construct a new Decimal object from value.\n\ | 52 Decimal([value[, context]]): Construct a new Decimal object from value.\n\ |
51 \n\ | 53 \n\ |
52 value can be an integer, string, tuple, or another Decimal object.\n\ | 54 value can be an integer, string, tuple, or another Decimal object.\n\ |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 can be constructed as follows:\n\ | 434 can be constructed as follows:\n\ |
433 \n\ | 435 \n\ |
434 >>> c = Context(prec=28, Emin=-425000000, Emax=425000000,\n\ | 436 >>> c = Context(prec=28, Emin=-425000000, Emax=425000000,\n\ |
435 ... rounding=ROUND_HALF_EVEN, capitals=1, clamp=1,\n\ | 437 ... rounding=ROUND_HALF_EVEN, capitals=1, clamp=1,\n\ |
436 ... traps=[InvalidOperation, DivisionByZero, Overflow],\n\ | 438 ... traps=[InvalidOperation, DivisionByZero, Overflow],\n\ |
437 ... flags=[], _allcr=1)\n\ | 439 ... flags=[], _allcr=1)\n\ |
438 >>>\n\ | 440 >>>\n\ |
439 \n\ | 441 \n\ |
440 \n"); | 442 \n"); |
441 | 443 |
| 444 #ifdef EXTRA_FUNCTIONALITY |
442 PyDoc_STRVAR(doc_ctx_apply,"\n\ | 445 PyDoc_STRVAR(doc_ctx_apply,"\n\ |
443 apply(x) - Apply self to Decimal x.\n\ | 446 apply(x) - Apply self to Decimal x.\n\ |
444 \n"); | 447 \n"); |
| 448 #endif |
445 | 449 |
446 PyDoc_STRVAR(doc_ctx_clear_flags,"\n\ | 450 PyDoc_STRVAR(doc_ctx_clear_flags,"\n\ |
447 clear_flags() - Reset all flags to False.\n\ | 451 clear_flags() - Reset all flags to False.\n\ |
448 \n"); | 452 \n"); |
449 | 453 |
450 PyDoc_STRVAR(doc_ctx_clear_traps,"\n\ | 454 PyDoc_STRVAR(doc_ctx_clear_traps,"\n\ |
451 clear_traps() - Set all traps to False.\n\ | 455 clear_traps() - Set all traps to False.\n\ |
452 \n"); | 456 \n"); |
453 | 457 |
454 PyDoc_STRVAR(doc_ctx_copy,"\n\ | 458 PyDoc_STRVAR(doc_ctx_copy,"\n\ |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 | 742 |
739 PyDoc_STRVAR(doc_ctx_to_sci_string,"\n\ | 743 PyDoc_STRVAR(doc_ctx_to_sci_string,"\n\ |
740 to_sci_string(x) - Convert a number to a string using scientific notation.\n\ | 744 to_sci_string(x) - Convert a number to a string using scientific notation.\n\ |
741 \n"); | 745 \n"); |
742 | 746 |
743 | 747 |
744 #endif /* DOCSTRINGS_H */ | 748 #endif /* DOCSTRINGS_H */ |
745 | 749 |
746 | 750 |
747 | 751 |
LEFT | RIGHT |