Skip to content

Commit eb8ac4c

Browse files
authored
gh-122450: Indicate that Fraction denominators are always positive (#136789)
1 parent acefb97 commit eb8ac4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/fractions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ another rational 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 ``numerator/denominator``. If *denominator* is ``0``, it
29-
raises a :exc:`ZeroDivisionError`.
28+
with value equal to ``numerator/denominator`` where the denominator is positive.
29+
If *denominator* is ``0``, it raises a :exc:`ZeroDivisionError`.
3030

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

0 commit comments

Comments
 (0)