diff --git a/Doc/library/fractions.rst b/Doc/library/fractions.rst index 8796056b4b8722..05075f81f2d642 100644 --- a/Doc/library/fractions.rst +++ b/Doc/library/fractions.rst @@ -121,12 +121,11 @@ another rational number, or from a string. .. attribute:: numerator - Numerator of the Fraction in lowest term. + Numerator of the Fraction in lowest terms. .. attribute:: denominator - Denominator of the Fraction in lowest term. - + Positive denominator of the Fraction in lowest terms. .. method:: as_integer_ratio() diff --git a/Lib/numbers.py b/Lib/numbers.py index a2913e32cfada7..8b2e8dfaa551ca 100644 --- a/Lib/numbers.py +++ b/Lib/numbers.py @@ -297,11 +297,13 @@ class Rational(Real): @property @abstractmethod def numerator(self): + """The numerator of a rational number in lowest terms.""" raise NotImplementedError @property @abstractmethod def denominator(self): + """The (positive) denominator of a rational number in lowest terms.""" raise NotImplementedError # Concrete implementation of Real's conversion to float. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy