14
14
The :mod: `fractions ` module provides support for rational number arithmetic.
15
15
16
16
17
- A Fraction instance can be constructed from a pair of integers , from
18
- another rational number, or from a string.
17
+ A Fraction instance can be constructed from a pair of rational numbers , from
18
+ a single number, or from a string.
19
19
20
20
.. class :: Fraction(numerator=0, denominator=1)
21
21
Fraction(other_fraction)
@@ -25,7 +25,7 @@ another rational number, or from a string.
25
25
26
26
The first version requires that *numerator * and *denominator * are instances
27
27
of :class: `numbers.Rational ` and returns a new :class: `Fraction ` instance
28
- with value ``numerator/denominator ``. If *denominator * is `` 0 `` , it
28
+ with a value equal to ``numerator/denominator ``. If *denominator * is zero , it
29
29
raises a :exc: `ZeroDivisionError `. The second version requires that
30
30
*other_fraction * is an instance of :class: `numbers.Rational ` and returns a
31
31
:class: `Fraction ` instance with the same value. The next two versions accept
@@ -116,7 +116,8 @@ another rational number, or from a string.
116
116
117
117
.. attribute :: denominator
118
118
119
- Denominator of the Fraction in lowest term.
119
+ Denominator of the Fraction in lowest terms.
120
+ Guaranteed to be positive.
120
121
121
122
122
123
.. method :: as_integer_ratio()
0 commit comments