diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2013-09-10 02:57:37 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2013-09-10 02:57:37 (GMT) |
commit | b505a6ac91325bf5ddf987f3ede9069724c3c53e (patch) | |
tree | d357fe1a6608274a95af2f217f7a1f311bc3ce32 /Doc | |
parent | 51ef074d57de41b1b2246f6ba2a4ed26392d4d80 (diff) | |
download | cpython-b505a6ac91325bf5ddf987f3ede9069724c3c53e.zip cpython-b505a6ac91325bf5ddf987f3ede9069724c3c53e.tar.gz cpython-b505a6ac91325bf5ddf987f3ede9069724c3c53e.tar.bz2 |
Document Fraction's numerator and denominator properties.
Addresses issue #18800
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/fractions.rst | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/library/fractions.rst b/Doc/library/fractions.rst index 59e6b1b..fba199b 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 |