From: Senthil Kumaran Date: Tue, 10 Sep 2013 02:57:37 +0000 (-0700) Subject: Document Fraction's numerator and denominator properties. X-Git-Tag: v3.4.0a3~89^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b505a6ac91325bf5ddf987f3ede9069724c3c53e;p=python Document Fraction's numerator and denominator properties. Addresses issue #18800 --- diff --git a/Doc/library/fractions.rst b/Doc/library/fractions.rst index 59e6b1b79a..fba199bf78 100644 --- a/Doc/library/fractions.rst +++ b/Doc/library/fractions.rst @@ -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