Skip to content

Commit b4bdda2

Browse files
authored
Add an explicit reference to conversion of constructor arguments
1 parent 668518d commit b4bdda2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/fractions.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ another number, or from a string.
2525

2626
The first version requires that *numerator* and *denominator* are instances
2727
of :class:`numbers.Rational` and returns a new :class:`Fraction` instance
28-
with value equal to ``numerator/denominator``. If *denominator* is zero, it
29-
raises a :exc:`ZeroDivisionError`.
28+
with a value equal to ``numerator/denominator``.
29+
The numerator and denominator of this new instance are converted to be in
30+
simplest integral terms, always with a positive denominator.
31+
If *denominator* is zero, it raises a :exc:`ZeroDivisionError`.
3032

3133
The second version requires that *number* is an instance of
3234
:class:`numbers.Rational` or has the :meth:`!as_integer_ratio` method

0 commit comments

Comments
 (0)