mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Merged revisions 59605-59624 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r59606 | georg.brandl | 2007-12-29 11:57:00 +0100 (Sat, 29 Dec 2007) | 2 lines Some cleanup in the docs. ........ r59611 | martin.v.loewis | 2007-12-29 19:49:21 +0100 (Sat, 29 Dec 2007) | 2 lines Bug #1699: Define _BSD_SOURCE only on OpenBSD. ........ r59612 | raymond.hettinger | 2007-12-29 23:09:34 +0100 (Sat, 29 Dec 2007) | 1 line Simpler documentation for itertools.tee(). Should be backported. ........ r59613 | raymond.hettinger | 2007-12-29 23:16:24 +0100 (Sat, 29 Dec 2007) | 1 line Improve docs for itertools.groupby(). The use of xrange(0) to create a unique object is less obvious than object(). ........ r59620 | christian.heimes | 2007-12-31 15:47:07 +0100 (Mon, 31 Dec 2007) | 3 lines Added wininst-9.0.exe executable for VS 2008 Integrated bdist_wininst into PCBuild9 directory ........ r59621 | christian.heimes | 2007-12-31 15:51:18 +0100 (Mon, 31 Dec 2007) | 1 line Moved PCbuild directory to PC/VS7.1 ........ r59622 | christian.heimes | 2007-12-31 15:59:26 +0100 (Mon, 31 Dec 2007) | 1 line Fix paths for build bot ........ r59623 | christian.heimes | 2007-12-31 16:02:41 +0100 (Mon, 31 Dec 2007) | 1 line Fix paths for build bot, part 2 ........ r59624 | christian.heimes | 2007-12-31 16:18:55 +0100 (Mon, 31 Dec 2007) | 1 line Renamed PCBuild9 directory to PCBuild ........
This commit is contained in:
parent
862543aa85
commit
5b5e81c637
241 changed files with 19189 additions and 19152 deletions
|
@ -88,7 +88,7 @@ reset them before monitoring a calculation.
|
|||
* IEEE standard 854-1987, `Unofficial IEEE 854 Text
|
||||
<http://www.cs.berkeley.edu/~ejr/projects/754/private/drafts/854-1987/dir.html>`_.
|
||||
|
||||
.. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
.. _decimal-tutorial:
|
||||
|
@ -263,7 +263,7 @@ a single cast inside a loop. With context set and decimals created, the bulk of
|
|||
the program manipulates the data no differently than with other Python numeric
|
||||
types.
|
||||
|
||||
.. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
.. _decimal-decimal:
|
||||
|
@ -274,7 +274,7 @@ Decimal objects
|
|||
|
||||
.. class:: Decimal([value [, context]])
|
||||
|
||||
Constructs a new :class:`Decimal` object based from *value*.
|
||||
Construct a new :class:`Decimal` object based from *value*.
|
||||
|
||||
*value* can be an integer, string, tuple, or another :class:`Decimal` object. If
|
||||
no *value* is given, returns ``Decimal("0")``. If *value* is a string, it
|
||||
|
@ -512,7 +512,7 @@ also have a number of specialized methods:
|
|||
correctly rounded using the :const:`ROUND_HALF_EVEN` rounding mode.
|
||||
|
||||
|
||||
.. method: Decimal.logb([context])
|
||||
.. method:: Decimal.logb([context])
|
||||
|
||||
For a nonzero number, return the adjusted exponent of its operand
|
||||
as a :class:`Decimal` instance. If the operand is a zero then
|
||||
|
@ -624,7 +624,7 @@ also have a number of specialized methods:
|
|||
|
||||
.. method:: Decimal.quantize(exp[, rounding[, context[, watchexp]]])
|
||||
|
||||
Returns a value equal to the first operand after rounding and
|
||||
Return a value equal to the first operand after rounding and
|
||||
having the exponent of the second operand.
|
||||
|
||||
>>> Decimal("1.41421356").quantize(Decimal("1.000"))
|
||||
|
@ -645,8 +645,8 @@ also have a number of specialized methods:
|
|||
the given ``context`` argument; if neither argument is given the
|
||||
rounding mode of the current thread's context is used.
|
||||
|
||||
If watchexp is set (default), then an error is returned whenever
|
||||
the resulting exponent is greater than Emax or less than Etiny.
|
||||
If *watchexp* is set (default), then an error is returned whenever the
|
||||
resulting exponent is greater than :attr:`Emax` or less than :attr:`Etiny`.
|
||||
|
||||
.. method:: Decimal.radix()
|
||||
|
||||
|
@ -657,7 +657,7 @@ also have a number of specialized methods:
|
|||
|
||||
.. method:: Decimal.remainder_near(other[, context])
|
||||
|
||||
Computes the modulo as either a positive or negative value depending on which is
|
||||
Compute the modulo as either a positive or negative value depending on which is
|
||||
closest to zero. For instance, ``Decimal(10).remainder_near(6)`` returns
|
||||
``Decimal("-2")`` which is closer to zero than ``Decimal("4")``.
|
||||
|
||||
|
@ -720,7 +720,7 @@ also have a number of specialized methods:
|
|||
|
||||
.. method:: Decimal.to_integral_exact([rounding[, context]])
|
||||
|
||||
Round the argument to the nearest integer, signaling
|
||||
Round to the nearest integer, signaling
|
||||
:const:`Inexact` or :const:`Rounded` as appropriate if rounding
|
||||
occurs. The rounding mode is determined by the ``rounding``
|
||||
parameter if given, else by the given ``context``. If neither
|
||||
|
@ -730,14 +730,14 @@ also have a number of specialized methods:
|
|||
|
||||
.. method:: Decimal.to_integral_value([rounding[, context]])
|
||||
|
||||
Rounds to the nearest integer without signaling :const:`Inexact` or
|
||||
Round to the nearest integer without signaling :const:`Inexact` or
|
||||
:const:`Rounded`. If given, applies *rounding*; otherwise, uses the rounding
|
||||
method in either the supplied *context* or the current context.
|
||||
|
||||
|
||||
.. method:: Decimal.trim()
|
||||
|
||||
Returns its argument with *insignificant* trailing zeros removed.
|
||||
Return the decimal with *insignificant* trailing zeros removed.
|
||||
Here, a trailing zero is considered insignificant either if it
|
||||
follows the decimal point, or if the exponent of the argument (that
|
||||
is, the last element of the :meth:`as_tuple` representation) is
|
||||
|
@ -755,7 +755,7 @@ operands*. A *logical operand* is a :class:`Decimal` instance whose
|
|||
exponent and sign are both zero, and whose digits are all either
|
||||
:const:`0` or :const:`1`.
|
||||
|
||||
.. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
.. _decimal-context:
|
||||
|
@ -1023,7 +1023,7 @@ those for the :class:`Decimal` class and are only briefly recounted here.
|
|||
|
||||
Converts a number to a string using scientific notation.
|
||||
|
||||
.. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
.. _decimal-signals:
|
||||
|
@ -1144,7 +1144,7 @@ The following table summarizes the hierarchy of signals::
|
|||
Rounded
|
||||
Subnormal
|
||||
|
||||
.. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
.. _decimal-notes:
|
||||
|
@ -1241,7 +1241,7 @@ the following calculation returns a value equal to zero::
|
|||
>>> 1 / Decimal('Infinity')
|
||||
Decimal("0E-1000000026")
|
||||
|
||||
.. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
.. _decimal-threads:
|
||||
|
@ -1279,7 +1279,7 @@ threads calling :func:`getcontext`. For example::
|
|||
t3.start()
|
||||
. . .
|
||||
|
||||
.. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
.. _decimal-recipes:
|
||||
|
@ -1435,7 +1435,7 @@ to work with the :class:`Decimal` class::
|
|||
return +s
|
||||
|
||||
|
||||
.. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
.. _decimal-faq:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue