Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
90d45ecc
Commit
90d45ecc
authored
Sep 09, 2013
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document Fraction's numerator and denominator properties.
Addresses issue #18800
parent
66f9acef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
Doc/library/fractions.rst
Doc/library/fractions.rst
+10
-1
No files found.
Doc/library/fractions.rst
View file @
90d45ecc
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment