We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb8ac4c commit 762e14cCopy full SHA for 762e14c
1 file changed
Lib/numbers.py
@@ -290,18 +290,24 @@ def conjugate(self):
290
291
292
class Rational(Real):
293
- """.numerator and .denominator should be in lowest terms."""
+ """To Real, adds numerator and denominator properties.
294
+
295
+ The numerator and denominator values should be in lowest terms with
296
+ denominator positive.
297
+ """
298
299
__slots__ = ()
300
301
@property
302
@abstractmethod
303
def numerator(self):
304
+ """The numerator of a rational number in lowest terms."""
305
raise NotImplementedError
306
307
308
309
def denominator(self):
310
+ """The positive denominator of a rational number in lowest terms."""
311
312
313
# Concrete implementation of Real's conversion to float.
0 commit comments