Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(167320)

Delta Between Two Patch Sets: Doc/library/decimal.rst

Issue 7652: Merge C version of decimal into py3k.
Left Patch Set: Created 7 years, 4 months ago
Right Patch Set: Created 7 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « configure.in ('k') | Doc/library/numeric.rst » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 :mod:`decimal` --- Decimal fixed point and floating point arithmetic 1 :mod:`decimal` --- Decimal fixed point and floating point arithmetic
2 ==================================================================== 2 ====================================================================
3 3
4 .. module:: decimal 4 .. module:: decimal
5 :synopsis: Implementation of the General Decimal Arithmetic Specification. 5 :synopsis: Implementation of the General Decimal Arithmetic Specification.
6 6
7 .. moduleauthor:: Eric Price <eprice at tjhsst.edu> 7 .. moduleauthor:: Eric Price <eprice at tjhsst.edu>
8 .. moduleauthor:: Facundo Batista <facundo at taniquetil.com.ar> 8 .. moduleauthor:: Facundo Batista <facundo at taniquetil.com.ar>
9 .. moduleauthor:: Raymond Hettinger <python at rcn.com> 9 .. moduleauthor:: Raymond Hettinger <python at rcn.com>
10 .. moduleauthor:: Aahz <aahz at pobox.com> 10 .. moduleauthor:: Aahz <aahz at pobox.com>
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 instance ``C`` and :class:`Decimal` instance ``x``, ``C.exp(x)`` is 944 instance ``C`` and :class:`Decimal` instance ``x``, ``C.exp(x)`` is
945 equivalent to ``x.exp(context=C)``. Each :class:`Context` method accepts a 945 equivalent to ``x.exp(context=C)``. Each :class:`Context` method accepts a
946 Python integer (an instance of :class:`int`) anywhere that a 946 Python integer (an instance of :class:`int`) anywhere that a
947 Decimal instance is accepted. 947 Decimal instance is accepted.
948 948
949 949
950 .. method:: clear_flags() 950 .. method:: clear_flags()
951 951
952 Resets all of the flags to :const:`0`. 952 Resets all of the flags to :const:`0`.
953 953
954 .. method:: clear_traps()
955
956 Resets all of the traps to :const:`0`.
957
958 .. versionadded:: 3.3
959
954 .. method:: copy() 960 .. method:: copy()
955 961
956 Return a duplicate of the context. 962 Return a duplicate of the context.
957 963
958 .. method:: copy_decimal(num) 964 .. method:: copy_decimal(num)
959 965
960 Return a copy of the Decimal instance num. 966 Return a copy of the Decimal instance num.
961 967
962 .. method:: create_decimal(num) 968 .. method:: create_decimal(num)
963 969
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 >>> getcontext().prec = 3 1921 >>> getcontext().prec = 3
1916 >>> +Decimal('1.23456789') # unary plus triggers rounding 1922 >>> +Decimal('1.23456789') # unary plus triggers rounding
1917 Decimal('1.23') 1923 Decimal('1.23')
1918 1924
1919 Alternatively, inputs can be rounded upon creation using the 1925 Alternatively, inputs can be rounded upon creation using the
1920 :meth:`Context.create_decimal` method: 1926 :meth:`Context.create_decimal` method:
1921 1927
1922 >>> Context(prec=5, rounding=ROUND_DOWN).create_decimal('1.2345678') 1928 >>> Context(prec=5, rounding=ROUND_DOWN).create_decimal('1.2345678')
1923 Decimal('1.2345') 1929 Decimal('1.2345')
1924 1930
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+