Changeset 391 for python/trunk/Doc/library/numbers.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/numbers.rst
r2 r391 8 8 9 9 10 The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric abstract11 base classes which progressively define more operations. None of the types 12 defined in this module can be instantiated.10 The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric 11 :term:`abstract base classes <abstract base class>` which progressively define 12 more operations. None of the types defined in this module can be instantiated. 13 13 14 14 … … 32 32 .. attribute:: real 33 33 34 Abstract. Retrieves the :class:`Real`component of this number.34 Abstract. Retrieves the real component of this number. 35 35 36 36 .. attribute:: imag 37 37 38 Abstract. Retrieves the :class:`Real`component of this number.38 Abstract. Retrieves the imaginary component of this number. 39 39 40 40 .. method:: conjugate() … … 48 48 numbers. 49 49 50 In short, those are: a conversion to :class:`float`, :func:` trunc`,50 In short, those are: a conversion to :class:`float`, :func:`math.trunc`, 51 51 :func:`round`, :func:`math.floor`, :func:`math.ceil`, :func:`divmod`, ``//``, 52 52 ``%``, ``<``, ``<=``, ``>``, and ``>=``. … … 74 74 .. class:: Integral 75 75 76 Subtypes :class:`Rational` and adds a conversion to :class:`int`. 77 Providesdefaults for :func:`float`, :attr:`~Rational.numerator`, and78 :attr:`~Rational.denominator` , and bit-string operations: ``<<``,79 ``>>``, ``&``, ``^``, ``|``, ``~``.76 Subtypes :class:`Rational` and adds a conversion to :class:`int`. Provides 77 defaults for :func:`float`, :attr:`~Rational.numerator`, and 78 :attr:`~Rational.denominator`. Adds abstract methods for ``**`` and 79 bit-string operations: ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``. 80 80 81 81
Note:
See TracChangeset
for help on using the changeset viewer.