[Python-checkins] cpython (merge 3.3 -> default): merge from 3.3

senthil.kumaran python-checkins at python.org
Tue Sep 10 04:58:30 CEST 2013


http://hg.python.org/cpython/rev/5fb700ca3fd5
changeset:   85652:5fb700ca3fd5
parent:      85650:967af1815967
parent:      85651:fe5c03fb0ff6
user:        Senthil Kumaran <senthil at uthcode.com>
date:        Mon Sep 09 19:58:20 2013 -0700
summary:
  merge from 3.3

Document Fraction's numerator and denominator properties.
Addresses issue #18800

files:
  Doc/library/fractions.rst |  11 ++++++++++-
  1 files changed, 10 insertions(+), 1 deletions(-)


diff --git a/Doc/library/fractions.rst b/Doc/library/fractions.rst
--- a/Doc/library/fractions.rst
+++ b/Doc/library/fractions.rst
@@ -77,13 +77,22 @@
    :class:`numbers.Rational`, and implements all of the methods and
    operations from that class.  :class:`Fraction` instances are hashable,
    and should be treated as immutable.  In addition,
-   :class:`Fraction` has the following methods:
+   :class:`Fraction` has the following properties and methods:
 
    .. versionchanged:: 3.2
       The :class:`Fraction` constructor now accepts :class:`float` and
       :class:`decimal.Decimal` instances.
 
 
+   .. attribute:: numerator
+
+      Numerator of the Fraction in lowest term.
+
+   .. attribute:: denominator
+
+      Denominator of the Fraction in lowest term.
+
+
    .. method:: from_float(flt)
 
       This class method constructs a :class:`Fraction` representing the exact

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list