]> granicus.if.org Git - python/commitdiff
Document Fraction's numerator and denominator properties.
authorSenthil Kumaran <senthil@uthcode.com>
Tue, 10 Sep 2013 02:57:37 +0000 (19:57 -0700)
committerSenthil Kumaran <senthil@uthcode.com>
Tue, 10 Sep 2013 02:57:37 +0000 (19:57 -0700)
Addresses issue #18800

Doc/library/fractions.rst

index 59e6b1b79a6a37d74b684a2f151a89e7bb4308e4..fba199bf787731f38b9549815ad97850d4f2ecd6 100644 (file)
@@ -77,13 +77,22 @@ another rational number, or from a string.
    :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